Trigger options for Agentic Workflow or AI Agent

MihirN
Tera Contributor

My goal is to initiate an Agentic Workflow and AI Agents mainly via a UI Action, not through a Now Assist chat-based trigger.

Is it possible to programmatically trigger Agentic Workflows and AI Agents using APIs, GlideRecord queries, Script Includes, Scripted REST APIs, or any other supported custom approach?

 

@Victor ChenI would appreciate any suggestions or guidance on alternative methods to achieve this.

9 REPLIES 9

diegobeltra
Tera Expert

Hi @MihirN 

Is possible to define a trigger for an Agentic Workflow.

Try this:

AI Agent Studio > Create and Manage > pick an existing Agentic Workflow or AI Agent (or create a new one)

You will see the Define Trigger tab that could be Record based (Created, Updated), Date based or Application based (Inbound Email).

 

Screenshot for Agentic Workflow trigger definition:

diegobeltra_0-1752129178928.png

Screenshot for AI Agent trigger definition:

diegobeltra_1-1752129431186.png

 

Other way to trigger AI Agents could be adding actions to your workflow in Flow Designer.

You can find Now Assist AI Agents actions as flow steps:

diegobeltra_2-1752129872489.png

 

Is also possible to trigger it by UI Action. You have some OOTB examples like this:

Generate Resolution Plan UI Action from Platform AI Agents and Skills application. This UI action triggers a specific AI Agent (from sn_aia_usecase table):

diegobeltra_3-1752130434072.png

 

 

Let me know if this helps you.

 

Kindly,

Diego Beltrame

 

 

 

@diegobeltra very nice response.

 

Regards

RP

Molina Lim 101
Tera Contributor

From flow designer, you can use this 'AIA Trigger Use Case' action under 'Now Assist AI Agents' spoke. 

 

For the input, Trigger Configuration Id = sys_id of your trigger from sn_aia_trigger_configuration table. 

Target Record = Target record from your trigger's target table.

 

Then, you can copy 'Code snippet to execute this Flow' and paste in your UI Action script!

kaustubhdub
Giga Guru

Whenever you create a trigger in the ServiceNow workflow, a flow is created behind the scenes with the trigger ID and the condition see if you can play around with those flows and triggers. But keep in mind that ServiceNow does not recommend this practice.  
Hopefully this was helpful to you.