With our input variable set up, let’s test it out with a simple script. Hover over the Record ID field and click on “Insert”: If you wanted to run an script against the base as a whole, then input variables would not be needed, but in our case, we want to update the specific record that has been marked as completed, so we need to know what the record is before we run the script.Ĭlick on “Add input variable” to set one up:įor our scenario, we want to pass the record id to the script, so we’ll set up a variable named “recordId” and get its value from the record identified by the trigger: The left-hand panel of the editor allows us to create input variables from triggers and actions that occur before the “run script” action. You’ll be presented with a script editor window, albeit one that is slightly different from the regular script editor. Click on the “Add action” button and select “Run script” from the options: (If you’re following this on your base, make sure that at least one of the record is marked as completed or the test will fail.) Test the condition to make sure it is set up correctly. Pick your table from the dropdown and add the condition - in this case when the “Completed” field is checked. Your “do something” is probably a lot more complicated and useful.Īnd selecting “When a record matches conditions” as out trigger. This isn’t a real world scenario - you are unlikely to want to do this - but we’re going for a simple “do something” here. In my case, the “do something” is write “Task completed” into the script output field. When I complete the task by clicking on the checkbox, I want the automation to run against the selected record, trigger my script and do something. My base is very simple - I have a task name field, a “completed” checkbox field and a “script output” text field: Let’s do some set up to show how this works. Like many Airtable users I’ve used Zapier, Integromat and other methods to automate actions on my bases, but the Airtable Automations feature brings this in-house, reducing the number of tools and apps I need to get a job done.Īs a script enthusiast, I think it’s fantastic that Airtable have built scripts into the Automations toolkit from the start, but the interaction of triggers and scripts isn’t completely obvious, so this post will show how to incorporate scripts into Automations. If you don't have access to the scripting extension as an enterprise user, please contact your enterprise administrator to adjust your permissions.Alongside the introduction of scripts, one of the big leaps forward in Airtable functionality in 2020 was the Automations feature. We're using this example base from Airtable Universe.Ī link to the Extracting Base Metadata Marketplace Script What you will needĪn Airtable base you'd like to extract metadata from. when a name or description changes), allowing users to run the script over time. The script will also manage updating existing records (i.e. In this guide, we'll customize a scripting extension in an example base to create an interface, aggregate base metadata, and write it to a standalone table for reference. This will generate a link to your calendar view within Airtable that you can share with anyone, but to sync with an outside service, you want to go down to Sync to an external calendar instead. Metadata about your base can be programmatically accessed via Airtable’s scripting extension or Airtable's Metadata API, which is available to Enterprise users. To share your calendar, go to the Share View menu and click Create a shareable calendar view link. How can I create a single base with my metadata? Organizing the names of tables and fields into a tabular format can be incredibly helpful for users who want to understand the types of information captured in the base without needing to check each table individually. This document outlines a solution for surfacing a base's metadata, or the schema, into a single table within that base using Airtable's Scripting extension and a script from the Marketplace.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |