Skip to main content

I have a zap that runs when a button is clicked as the trigger.

The steps are fetching open sales orders from our inventory system, formatting the data with clickable checkboxes in a Google doc, and outputting it to a file.

Before looping through Sales Orders, I am creating a Google Doc from template and retrieving the document ID. In next steps, I am using that document ID to insert text using the Google Docs API (only way to get the checkboxes). Each iteration of the loop is getting the index data to determine where to insert the text. Instead of the text getting output into a single file, a new file is being created for each loop iteration. 

Any idea what I am missing here?

 

 

Hi ​@chris_benjamin 

For us to have more info, we would need to see how your GDoc Zap steps are configured in EDIT mode with the field mappings visible.


@Troy Tessalone 

Here are the Google Doc steps:

Step 7 - Create Document From Template

 

Step 15 - Get Doc details for Index

 

Step 18 - Append to document

 


@chris_benjamin 

We would need to see more proof that multiple GDocs are being created.

Check your Zap Run history to see the DATA IN/OUT for each step to help you trace the data flow and troubleshoot.

 

If a Zap Run encountered an issue and the GDoc step 7 was replayed that can result in multiple GDoc being created.

If a Zap Run was replayed, then that can result in multiple GDocs being created.

 

NOTE: Looping iterations run in parallel, so if you want them to process sequentially then you would need to add Delay (After Queue) logic.


 


Thanks ​@Troy Tessalone.

Looking at the zap run, I can confirm that even though step 7 to create the GDoc is before the loop, it is running with each loop iteration and a new document ID is being stored in step 8 with each iteration.

It may be happening during the actual step 7 and not the loop because it’s step 7 that is creating the multiple files before the loop ever starts. 

 


@chris_benjamin 

FYI: Each Loop Iteration will have it’s own Zap Run.

Steps before the Looping step only run once.

In the Zap Runs, check the DATA OUT from Zap Step 7, it should show the same GDoc ID.

 

Help links for using Looping: https://zapier.com/apps/looping/integrations#help


Thanks so much for the help here ​@Troy Tessalone! I was able to solve this by moving the GDoc creation step higher in the zap, before retrieving the open orders. The only downside is it will create a file even if there are no open orders, but we are triggering this manually anyway so it shouldn’t be an issue.

Thanks again!


That’s an amazing news ​@chris_benjamin! A huge thanks to Troy for pointing you in the right direction!

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help! 🤗