Apps Script Tasks are now available: Call Apps Script functions in AppSheet Automation

We're happy to announce that Apps Script Tasks be rolling out for all users in AppSheet this week! This will allow you to natively call Google Apps Script functions within your AppSheet automation workflows, enabling your apps to tightly integrate with over 30 Google Workspace apps and APIs like Drive, Calendar, Gmail, and even external services.

Example uses:

  • Create a calendar appointment when a button is clicked
  • Add a slide to a presentation when a new row is added
  • Save photos to Drive and share with specific individuals when uploaded via a form
  • Create an audit log by generating a Google Docs file with data from a table

The feature will be rolling out to everyone this week (starting April 12th) and be available to all users later this week. 

nico_0-1649787982541.png

 

What should I try out?

We would love for you to help us validate and give us feedback on:

  • Task configuration usability
  • Authorizing a script
  • Any problems with parameter passing or task execution
  • Any error states and edge cases 
  • Any specific use cases you will find useful to test
  • Important note: please do not use production data for preview features

Find code samples and our walkthrough video in our Help Center.

How can I configure an Apps Script Task?

  1. Go to the Automations page in the AppSheet app editor.
  2. Create a Bot (AppSheet Automation)
  3. Create a new task
  4. You will see a new top-level task type: Call a script in the task configuration panel
  5. Select an Apps Script project from your Google Drive. Note: you may have to authorize the Script with the โ€œAuthorizeโ€ button in order to execute it
  6. Finally, select the function to call, and specify the expressions to pass as arguments

 

You can also click the button to open the Apps Script project in a new window, which will bring you to the Apps Script editor, to edit the script directly.

nico_1-1647464359791.gif

 

Limitations

  • Apps Script executions are subject to standard Google Workspace quotas
  • Apps Script tasks are available to all creators in the prototype phase and available for deployed apps for the AppSheet Core plan and above
  • Return values from the function are not yet supported
  • Running Apps Script from a Service Account is not supported
  • Please visit the Help Center article for details & limitations

 

How do I give feedback?

Please add comments/reply to this post!

We'd love to hear if you have any specific use cases in mind for Apps Script Tasks. If you have any other feedback, please share it in this thread as well!

 

21 160 11.2K
160 REPLIES 160

There can be throttling if the overall execution load on the server is particularly high but this rarely happens. But I think when you bulk edit rows it'll run each Apps Script function sequentially and that's likely a bigger culprit for slowness. Assuming you don't need the return value, you can run the Apps Script task asynchronously (in the background) and that should reduce the overall runtime of a bulk edit like this.

Depending on what you're doing in the Apps Script function, there may be ways to optimize that as well particularly if network calls are used.

It might take a few minutes before the execution shows up in the performance monitor but that'll give you a breakdown of the time spent after the execution completes.