Hi all,
I’m using Zapier to integrate HubSpot CRM and Pipedrive. I’m currently working on a Zap that triggers from a new deal in HubSpot to create a new deal in Pipedrive. I am also trying to create and associate companies and contacts that are attached to the deal in HubSpot in Pipedrive.
Everything works great as long as there are 1:1:1 relationships between the objects, but a problem arises when there are multiple contacts associated with the deal in HubSpot. In order to get the HubSpot contact data to create a Pipedrive person, I’m using a Zap step to Find Associations in HubSpot, which gives me the following output:
deal_to_contact
0: 80891751
1: 108876301
These are IDs of contact records in a HubSpot account, so it’s giving me the information I want. However, if I try to use this output in the step to GET the contact record, the request includes both IDs, formatted as “80891751,108876301”. Because HubSpot is expecting only one string of numbers for an ID, it errors , doesn’t get any records, and my Zap can’t move forward.
So, I’m trying to figure out how to extract only the first string of numbers. Ideally, I want Zapier to break on the comma and give me only the first string to use in the following GET step.
I had hoped I could use a Formatter by Zapier step for this, but I haven’t figured out how to only get the first string. All of the options I’ve played with still end up with an output of both IDs together, and HubSpot won’t search for more than one ID at a time. (The specific error is, “Object not found. objectId are usually numeric.”)
I can’t use the formatter options based on length, since the ID number length can change, and even if I try to segment on the comma into separate fields, the output is:
output
0:
Item 1: 808917511:
Item 1: 108876301
...and when I try to use that in the following step, it still is “Output Item 1: 80891751, 108876301”
How do I get Zapier to only produce an output of the first string of numbers, up to the comma? i.e. “Output Item 1: 80891751”
Thanks!