table1 > automation bot > apps script > return value > update table2

Hi, is there a way to have a table1 trigger an automation event which calls an apps script function which returns a value to be used to update a value in a row in table2?

Yes, you would build an automation around “Table” 1 with 2 steps. Step 1 calls the script and capture the return value in a variable. Step 2 uses that variable in a Data Change action of type “execute an action on a set of rows”. This action calls the update action on Table 2 and uses the INPUT() function to pass the script variable as an argument.

You can find out more about the INPUT() function in this article: Set input values dynamically in data-change actions

NOTE: There are 2 implementations of the INPUT() function. The article above is the latest. You may find articles that refer to the previous implementation. Both are still supported.

2 Likes