Question

How do I extract and map HubSpot Line Item data for PandaDoc and QuickBooks Online using Zapier?

  • 20 February 2024
  • 11 replies
  • 94 views

Badge

I have been unable to figure out the steps to pull all Line Item data from a Deal in HubSpot. I have tried both the “Find Line_item in HubSpot” action and the Zapier “Loop” action, but to no avail.

My goal is to map each line item to a Pandadoc document. There are 3 data points from the HubSpot Line Item data that I want to pull, and I haven’t been able to figure out how to 1) fetch all the line item data and 2) parse it so it’s usable to feed into Pandadoc. I also want to use the same Line Item data to map into a Quickbooks invoice draft.

The Zap is triggered by a “Stage” update in HubSpot -- when the Deal moves to “Ready for Contract” that should auto-create a Pandadoc draft document with all line items.

Of note: Not every HubSpot deal will have the same number of Line Items. Sometimes there will just be 1, other times as many as 10 (or in theory more but usually just 1-5).

How do I build a Zap to find all associated Line Items and have the data mappable to Pandadoc and other Apps?


11 replies

Userlevel 7
Badge +14

Hi @tomspaghetti 

Try this Zap action: HubSpot - Find Associations

Deal to Line Items

 

Badge

Thanks. Could you provide the specific steps? I tried this and it error’d.

 

 

Badge

Ok sorry -- figured out that step I believe, which outputted the Line Item IDs:

Now I believe I’ll need to use the Loop step to separate all the IDs, but now I’m running into trouble there:

The test seems to work:

But when I go to the Get Line Item step next, it doesn’t separate the ID’s from the Loop step -- it still has them all bundled together in one long string:

Any idea?

Userlevel 7
Badge +14

@tomspaghetti 

Scroll down and look for this variable.

Badge

It’s there -- but only shows 1 option (the first in the string):

How do I run this so that I can pull the run the “Get Line Item” step for each Line Item, and pull the 3 data points I need from each Line Item to then plug into the Pandadoc document?

Userlevel 7
Badge +14

@tomspaghetti 

Looping help article: https://zapier.com/apps/looping/help

 

Badge

Hi Troy, I really appreciate the follow ups, however I have already read the help articles before coming to this forum. I am not able to figure this out with the article alone.

Can you please provide the steps needed to grab all outputs of the Looping action?​​​​​

This is the step I am stuck on:

The “Line Item ID” only provides the first in the string. How can I pull the rest of the Loop Values out? If you are able, please provide the exact steps.

Badge

The Note you screenshotted said: 
“You must not use the preview_loop_values field from the loop test in your Zap. It is for preview purposes only and does not appear in actual Zap runs.”

Okay, so don’t use the he preview_loop_values field from the loop test. What SHOULD I use instead? How do I pull the second, third etc. number from the string?

Userlevel 7
Badge +14

@tomspaghetti 

The help article indicates that you can only test the first loop.

You would have to turn the Zap ON and test live to test all the loop iterations.

  • When you test this action, the Zap will only create the first loop. It will not create any other loops during the test.
  • You must not use the preview_loop_values field from the loop test in your Zap. It is for preview purposes only and does not appear in actual Zap runs.

 

 

Badge

Troy -- I’ve done this. I have read the article and followed the steps, yet it is not working. 

Are you able to provide the steps? I just ran a test with live data, went back into to edit the zap, and am unable to pull any ID from the string except for the first one.

In the article, which I read before coming to this Community and which you have linked to multiple times since, does NOT provide the steps of how to actually pull the 2nd, 3rd etc. numbers from the string. It only says what NOT to do.

Are you able to provide the steps yourself? Please do not link the help article, I have read it and attempted to make it work to the best of my ability. 

Userlevel 7
Badge +14

@tomspaghetti

As indicated in the help article you are only able to test the FIRST loop iteration in the Zap Editor.

 

You would have to turn the Zap ON and test live to test all the loop iterations, then check the Zap Runs history activity to see the DATA IN/OUT for each Zap step.

 

If you are trying to handle the aggregation of all the returned HubSpot Line Items at the same time before being sent to PandaDoc, then you may need to explore using these options:

 

If you are looking for help, consider hiring a Certified Zapier Expert: https://zapier.com/experts

Reply