If you are trying to do this in airtable automations there is no watch feature. You can, however, trigger the automation to start when a new record is created, and then create a new record in the other table without using any scripting if you wanted to.
Thank you for the answer, Indeed that was what I did, but I would like to know, how to do this through a script.
I would like to improve my skills in javascript for both, Google Apps Script and Airtable.
@geocarlos
Here's what you can do:
Use Airtable Automations: Instead of trying to watch for changes in the scripting app, set up an Automation directly within Airtable's interface:
- Choose the trigger as "When a record is created" in the "Team Tracker SSOT" table.
- Then, for the action, you can choose "Run a script" and use a script that creates the record in the "TAGS TSM PODS" table.
Script: For the script action in Airtable automation, it would look something like:
// Get input data from the trigger (the created record in Team Tracker SSOT)
let inputRecord = input.config();
// Define the table where we want to create a new record
const tagsPods = base.getTable('TAGS TSM PODS');
// Extract the FULL NAME value from the triggered record
const valueToFill = inputRecord.getCellValue('FULL NAME');
// Create a new record in the TAGS TSM PODS table
await tagsPods.createRecordAsync({
'FULL NAME': valueToFill
});
When you set up the script in the automation action, make sure to pass the triggered record (record ID as inputRecord value from "Team Tracker SSOT" in this case) as an input to the script so it can access its values.
ChatGPT can be invaluable when learning javascript for Google Apps Script and Airtable. Not that it's always correct but it can usually point you in the right direction.