• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Iterator to Doc query

daraghos

Member
Hi

I am trying to get the output of an iterator into a google doc, the way it is at the moment I can only seem to create a loop that creates errors. Is there a 'best practice' way to get all the data into one doc?

Thanks

Daragh

Here is the workflow history id:

IjU3NjUwNTZlMDYzZTA0Mzc1MjZhNTUzNjUxMzA1MTY2NTQzMTBmMzci_pc
 

Preeti Paryani

Moderator
Staff member
Pro Member
Hi @daraghos,

Thank you for reaching out.

Could you please elaborate on the exact use case you're trying to achieve? This will help us better understand the goal and suggest the most suitable approach.

Please note that when an Iterator is added in a workflow, it will execute all subsequent actions once for each object in the array passed to it. This means that if you are trying to compile all the items into a single Google Doc, using the Iterator directly may not be the best approach, as it creates a loop per item.

Looking forward to your clarification so we can assist you more effectively.
 

daraghos

Member
Hi @daraghos,

Thank you for reaching out.

Could you please elaborate on the exact use case you're trying to achieve? This will help us better understand the goal and suggest the most suitable approach.

Please note that when an Iterator is added in a workflow, it will execute all subsequent actions once for each object in the array passed to it. This means that if you are trying to compile all the items into a single Google Doc, using the Iterator directly may not be the best approach, as it creates a loop per item.

Looking forward to your clarification so we can assist you more effectively.
Hi Preeti

Thanks.
Ideally, I pull the information from the json and I can compile into a doc using the 'create doc from template' action, but I can't do that directly. An interim step would be great, where I can compile the info first, and then push to google docs as one chunk.
At the moment, i'm pulling information in from a json file and I want the iterator to then pass the info to the google doc using the 'append a paragraph action' this seems to break google ; ) and it gives an error presumably because of the looping. Ideally there would be an interim step between the iterator and doc, where I can compile all the info contained in the json. I am having a blank as to how to do that, or what is the best method here.

Hope that makes sense.
 

Preeti Paryani

Moderator
Staff member
Pro Member
Hello @daraghos,

Thank you for the detailed explanation.

Currently, we do not have an interim step available that can compile data after the iterator and before passing it to the Google Doc. As it stands, any action added after the Iterator will run once for each object in the array, which is why you're experiencing issues with the "Append a Paragraph" action.

However, as a workaround, you can consider using a JSON extractor step, code(Pabbly) step, or an OpenAI step to process the array and generate the output in the desired format (e.g., a compiled block of text). You can then pass that single formatted response directly into a newly created Google Doc using the Create Document from Template or Create Document action.

Based on your use case, using the iterator might not be the best fit if the goal is to compile and insert all data into the document in one go.
 
Top