Help

Script for sending an updated field to an external platform via API

781 4
cancel
Showing results for 
Search instead for 
Did you mean: 
MintorChatSolut
4 - Data Explorer
4 - Data Explorer

Hi, I'm running an automation that monitors a table for certain fields and when any of those fields get updated, I want to run script that sends those field values to an external platform, via an API call to that platform. I know how to write this script, however I can't figure out how to reference the specific record whose field was updated. Is this possible?

Here is a screenshot of my automation.

 

4 Replies 4

 

Try adding the record ID as an input variable like so:
Record ID Input Config.png

ScottWorld
18 - Pluto
18 - Pluto

Yes, you need to specify the triggering record ID as a variable in the input.config.

I show how to do this when sending records to Make’s advanced API platform in the thread below — be sure to look at the screenshots that I posted:

https://air.tableforums.com/t/instantly-trigger-a-make-com-automation-from-airtable-i-e-sending-airt...

Hi,
to avoid querying the record by RecordID, you can just add those 3 values to a left side
and then 

const {status,country,camp_office}=input.config()

note that variable names in code must match variable names you set in the left side.
you can also avoid hardcoding and simply pass all available data from left side, cloning input.config() and possibly add some data to it. of course, it depends on platform API requirements

 

Alexey_Gusev_0-1725074196941.png

 

MintorChatSolut
4 - Data Explorer
4 - Data Explorer

Thanks so much for your quick responses!