Welcome to the community, @John_Meredith1! :grinning_face_with_big_eyes: This is definitely doable using a couple different options. If your base is in a Pro-plan workspace or higher, you can use Airtable’s newly-added automation features to do this (it’s still in beta, and there’s a chance it’ll be opened up to Free and Plus workspaces down the road, but for now it’s only on Pro or higher workspaces). Otherwise you’ll need to use an external integration service like Zapier or Integromat. Let us know which option you’d like to explore, and we can give you more specific direction.
Welcome to the community, @John_Meredith1! :grinning_face_with_big_eyes: This is definitely doable using a couple different options. If your base is in a Pro-plan workspace or higher, you can use Airtable’s newly-added automation features to do this (it’s still in beta, and there’s a chance it’ll be opened up to Free and Plus workspaces down the road, but for now it’s only on Pro or higher workspaces). Otherwise you’ll need to use an external integration service like Zapier or Integromat. Let us know which option you’d like to explore, and we can give you more specific direction.
Thanks @Justin_Barrett! I’ve got a pro-plan, so I’ve been exploring the automation feature—I just don’t know enough of scripting to build what I need. I’m also open to use Zapier if that’s easier, any help would be greatly appreciated!
Thanks @Justin_Barrett! I’ve got a pro-plan, so I’ve been exploring the automation feature—I just don’t know enough of scripting to build what I need. I’m also open to use Zapier if that’s easier, any help would be greatly appreciated!
Either option would work, though my preference is to use Airtable’s automation features. Here’s a rough outline of the steps:
- Create a new automation, using the “New record” trigger option. Adjust the trigger settings to find new records in the
[Survey 2]
table.
- Add a “Run script” action to the automation. Add two input variables for the script, both coming from the trigger step:
a. recordID
- The record ID of the triggering record
b. email
- The email address in the triggering record
- Use the following code for the script, replacing your table and field names as needed:
let config = input.config();
let survey1Table = base.getTable("Survey 1 Table Name");
let survey2Table = base.getTable("Survey 2 Table Name");
let query = await survey1Table.selectRecordsAsync();
let found = query.records.filter(record => record.getCellValue("Survey 1 Email Field") == config.email);
if (found) {
await survey2Table.updateRecordAsync(config.recordID, {"Link Field to Survey 1 Table": [{id: found[0].id}]})
}
Save the script, activate the automation, and everything should be good. I just tested this script on my end, and it works well.