Using recently added via script data in the following task

Hello community,

The data structure is
Order -> Services (have ref to Order)

I have a bot that contains two tasks.
The first one is the app script that adds new rows to the google sheet "Services".
The next task sends the PDF report to users and iterates over [Services] inside the template. 

The problem is that the recently added "Services" are not available in the next task. But if I just re-send the E-mail later all data is the report.

Is it possible to refresh data before executing the second task?

Best regards

0 5 100
5 REPLIES 5

Why donโ€™t you use the bot to add the rows directly through your app instead of using Apps Script?

There is a complicated logic and calculations before adding rows.

You might want to investigate the use of the tasks return values, so that you can keep the logic in your script and return the column values to the bot. 

Also check the apps script task to see if it is marked as asynchronous or synchronous. You will definitely want to wait for the script to finish before advancing to the next step.

The apps script task is synchronous. It looks like the next task has to sync with the server to obtain newly added data.

Top Labels in this Space