I’m trying to create a summary field in Hubspot that basically concatenates all the line items of the deal into one field that I’m going to push back up to a deal summary field. I’ve got the trigger setup to start when a deal is moved to won.
- I then go look up the associated line items
- I count how many there are (so I have a way to stop the loop) then
- I start the loop,
- it goes and finds the line items (one by one - each loop)
- It then puts them into a digest field
- which is constrained to publish after the loop has reached the count from the prior calculation
- Then I used the filter to push the final summary field (after all the loops have completed)
And then I update the field in hubspot.
It triggers, and runs until the last loop, I keep getting this error.
How do I get this to work? Should I be using a digest for this or is there an easier way? Also when I’m using the filter with the loop, is there a different way to let it move past the last loop and so that I only have to update the hubspot summary field one time?
Here’s the whole zap - all the formatter stuff is just to calculate the number of line items so I can use it in the loop.
We’d need to see screenshots with how the Digest in Step 9 and Filter in Step 10 is configured, thanks.
After I initially got this working with digest, I realized that it just appends forever so instead of just pushing the 4 line item worth of data, it pushed all the line items for that loop that I’ve ever run (even while I was testing) and I can’t find a way to clear or reset that value. So I’ve now changed that to storage and at the very end of the workflow it's supposed to remove those values (at least that’s what I’m trying to do with this function below). This doesn’t appear to be working however as I only get the last line item value (4 times - the number of times the loop runs) in the final summary field, not 4 unique values from each line item reference.
Please help me fix this! How do I loop through, find the values I want, and append them to the varibale. Then at the end of the loop when the filter is met for last loop, push the concatenated values (ie the variable) into the hubspot field.
Here’s the new steps with details
NOTE: You may want to add a Delay After Queue step at the start of your Zap in case the Zap can be triggered multiple times at or around the same time, especially if you are using the same Storage Key.
If you are manually testing the Looping step, then only the first loop iteration will be available.
Make sure to read the description for this field in Step 11.
FYI: You can likely use 1 Code step to replace multiple Formatter steps to further optimize the Zap Task usage.
I realize most of this could be done using the code feature but I’m not a dev (which is why I’m paying zapier) yet y’all have made it incredibly difficult to do even the most basic things. Like looping through a list and concatenating it into a single field. Please let me know how you would recommend doing this workflow as I’ve been battling this for a long time and I don’t feel like I’m getting anywhere. Is storage the only way to store output data from zaps to be used later in that same zap or is there another way? Again, this doesn’t need to be a global variable or anything like that, just something that I can use for the duration of the zap and then goes away or gets cleared at the end. It doesn’t appear that storage is working for this.
To clarify, I don’t work for Zapier, but I am a Certified Zapier Expert: https://zapier.com/experts
Did you adjust this?
It says use % but how does it know which values to use in place of the % when i’m having to create these in a loop each time?
I’m all ears on this one though.
Here’s what the output looks like when i use the % as placeholders. I clearly don’t understand how they’re describing using this feature/tool. This would be the desired output if the % signs were the lookup values from each of the line items I want it to pull during the loop. But I don’t know how to make it do that. Please let me know if you have any ideas around how to make it actually work
Looks like you are missing the s after the %s as indicated in the field description.
Items from the list will be combined together into a single value with this format.
%sas a placeholder for each list item.