Airtable script - post record updates to an API
-
I use this simple script to add as an Airtable app, which lets me/the team post an update to a notification service (usually powered by Autocode) directly from Airtable.
-
let backlog = base.getTable('Backlog'); let sourceRecord = await input.recordAsync('Choose a record', backlog); let name = sourceRecord.getCellValue("Name") let assignedTo = sourceRecord.getCellValue("Assigned To") let complete = sourceRecord.getCellValue("Complete") let message = "" let link = `https://airtable.com/appXXX/tblXXX/${sourceRecord.id}` if (complete) { message += "✅ Complete - " } message += `${name}` if (assignedTo) { message += ` - ${assignedTo?.name}` } message += ` - <${link}| *link* >` let url = `https://yourservice.com/slack/?message=${message}&link=${link}` let response = await fetch(url)
-