Skip to main content

Hey team 👋

I’m trying to build a Zap that does the following 

  1. When given a company domain → find the company ID in Hubspot 
  2. From the company ID, find the associated deals 
  3. If there is 1 deal, get deal details and update Google Sheet
  4. If there are multiple deals, find the deal with the most recent activity, then get details of that deal

I’m struggling with step 4 here - trying to sift through multiple deals. I imagine there’s probably a loop somewhere involved. 2 questions from me so far

  1. Step 4 is the “Find Associations” step from Hubspot and I’ve been able to find the Hubspot IDs successfully. However, when I put it through the loop, it sees the result as one long string instead of individual IDs. I've tried converting it to text instead of line items but then the “Get Deal” step from Hubspot fails as it seems to be expecting a number
  2. What would the logic of the loop be to sift through multiple deals and find the one with the most recent activity date. Would be great to get some help on the specific steps needed to do this since we need to dynamically compare values 

 

Thanks in advance!

Hi ​@earlywork_team 

Options to try:


Hey ​@Troy Tessalone !

Thanks for the nudge to use the Custom Action - haven’t ever used this before but I think i’ve got it working!

Cheers,

Marina


Wow! Thank you for confirming that Troy’s resolution got the Zap running. This will significantly help our Community members to have as a reference for the same issue.