Appsheet automation with multiple script outputs

Hello All,

I need your advice.

I have a sheet with three columns: Project, shared_folder_id, shared_file_id

I have created an automation (bot) that, when a new Project is created, Apps Script is called and creates a new Google shared folder. then I used the data output method to add the shared folder link to the column Shared_folder_id, and this worked fine.

Then, I wanted to add to the same script another step that creates a Google sheet in that created shared folder. Then, I wanted to write the Google sheet link into the shared_file_id column. This is where I have my challenge.

It seems that the Appsheet bot can handle only a single OUTPUT from the script.

What do you suggest is a better way to achieve the creation of the shared folder and the shared file and write their links into the dataset culomns?

1 Like

When I built the same (or similar) automation I had the Apps Script itself write the file and folder ids into the spreadsheet however if you read up on the use of nested fields in the response it seems possible to achieve what you want using this method.
https://support.google.com/appsheet/answer/12309564#nested-fields

Thanks James.
I have read about the nested fields. I seem to have a gap about how to configure the bot to correctly get the data to where it needs to be.
I am trying to use appsheet capabilities to the maximum and to minimize scripts that might require additional maintenance later.

Did you try to do some testing with the nested fields then? I would think something like this could work:

return {
    shared_folder_id: [insert folder id variable],
    shared_file_id: [insert file id variable]
}

Then your automation would user [StepName].[shared_folder_id] and [StepName].[shared_file_id] or something similar.

2 Likes

Create an output object for your script, inside which you can have any number of keys of various types.

1 Like

I ended up creating two different automations, one for the folder and the second for the file. Both launched when the shared file ID was changed.

It is working as I expected.

1 Like