Iterate Task, Save Values received from server side actions

Hello,

We are trying to upload multiple images to Google Drive. This can be done but iteration task. We wish to save the information from the REST api call response of the google drive rest api for upload image call.
The issue is, if we upload 2 images, only the last image is uploaded twice and returned.
The workflow infolves using a file upload control to hold image blob and that is read in iteration. Its values are not getting iterated.

In which Variable/Control can the Interim values of iteration task be saved?

Yash

Hi @tl1 ,
As you are setting the data in the file upload control in the iterate task, it is getting set simultaneously as the iterate task runs asynchronously hence all the iterations will run simultaneously resulting in this behavior.
A more effective approach would be:-

  1. To Create a variable within the data query section to store all the URLs.
  2. Reference this variable within a JavaScript code block inside the iterate task.
  3. Inside the JavaScript code block, concatenate all the URLs to the variable and create a concatenated string as the output.

  4. Use the Set Data Query action to set the value of the variable to the output generated by the JavaScript code.

    I hope this helps.
1 Like
DronaHQ Docs have found a new place!

We have updated and moved our documentation to docs.dronahq.com.
You can continue to ask questions in the community here.