Scripting - Get Selected Record

Topic Labels: Scripting extentions
3711 4
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

We’re using a view to contain company distribution groups. When a user filters into view, I’d like to add the Active Directory user with that email address to a given M365 group. All I need to be able to do is grab the email address off of the selected record within the script > HTTP call. Is it possible to get the selected record (the record that filtered through and caused the automation to happen) so I can provide the email address off of it to my Power Automate flow?

4 Replies 4

Hi @Deron_Witmer,
I do apologize, I am not 100% sure I follow.

Do you want to get the Record ID of the record that caused an Automation trigger? In your automation actions you will see the record ID from the Trigger record.

In your table, you can get a record ID by adding a formula field with


Or are you scripting in the Scripting Extension and you need to grab a recordID?

Hi Vivid-Squid - that’s exactly right. In my script, I am sending an HTTP call. Within the body of that call, I need to include an email address. That email address is stored on the record that triggered the automation. So, in short, I need to access information from the record that triggered the automation to be available to my script (which is the action on the automation).

I see. You need to set the record_id as an input variable on the left hand side of the automation script editor page.
There you can add the record_id from the trigger event and call it later in your script.


Value(s) also can be retrieved directly


for example, i’m using that for kind of inter-base connection, where keeping sync is not a good solution.

let payload={...input.config()}
const options={method:'POST', body: JSON.stringify(payload),
headers:{'Content-Type': 'application/json'}}
const responce=await fetch(addr,options);
const result=(responce.ok)? await responce.json() : responce.statusText;