AI agent trigger record

JK9903
Mega Guru

Hello everyone, 
Is it possible to get the trigger record details as a data pill or any other way in AI agent?

Trigger is inbound email, and I want to get the sys_email record details like sys_id and message_id

 

Thanks,

JK

3 REPLIES 3

warren_chan
ServiceNow Employee
ServiceNow Employee

You should be able to reference the Target record attributes directly in inbound email triggers. What exactly are you intending to do after gathering the record details?

Hi @warren_chan ,

 

My requirement is, once I receive an email to ServiceNow. It should trigger this AI agent where I have a tool as getEmailLoop. To this tool I need to pass the message_id from the triggered email record.

Here I'm not sure how to get the message_id from the triggered email inside AI agent

JK9903_0-1765276145853.png

 

Thanks, 
JK

warren_chan
ServiceNow Employee
ServiceNow Employee

I'd recommend trying to formulate conditions from the Target record instead of the actual Email [sys_email] record.

 

If you must have Message ID, I don't believe you can get that from the Trigger conditions. You would have to work backwards from the Target record that is created/updated [Lead?] on the inbound email action, and cross-reference the Email [sys_email] record to get the Message ID. This is likely possible through scripting, but not sure if it's still worth it for your use case to jump through those hoops.