Run Script get new record

Topic Labels: Automations
393 1
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

Hello guys,

I have created an automation that is being executed when a new record is created, what I wanna do is to get that specific new record in the script, the last one, how can I do that?



1 Reply 1

You can choose input parameters, such as trigger record ID, on the left side of script step menu.
All input variables, with names defined by you, passed to script by object input.config()
Then you should do smth like:

let inputData=input.config()
let recordID=inputData.ID

or, using ES6,

let {recordID, userName}=input.config()

You can also get values as parameters, but depending on the way of record creation, it might be empty, so you can choose another trigger.