How do I trigger/ start a ServiceNow workflow via REST APIs?

Shrisha
Kilo Explorer

I wanted to know how to trigger a ServiceNow workflow via REST APIs.

Thank you,

Shrisha.

1 ACCEPTED SOLUTION

Alexey7
Mega Sage

Take a look at: 

https://community.servicenow.com/community?id=community_question&sys_id=8dc44be9dbd8dbc01dcaf3231f96...

 

Please mark this answer as helpful or correct, if it solves your problem.

 

Regards,

Alexey

View solution in original post

10 REPLIES 10

pavan9885
Tera Guru

Hi Shirisha,

 

 

Workflows automatically starts, when certain conditions satisfied/arised. You can put a condition to start the workflow. From external application, using REST API, make that condition satisfied, which starts workflow.

 

 

 

For example, For the workflow, set a starting condition as "when status = new". Using REST API, from other application you can set status value to "new", so that workflow will start.

 

 

 

Table API - ServiceNow Wiki

 

 

Note : Please mark my answer correct / Helpful so this question and answer will not be wipped out from the community 

What is "status" in this case and where do I set its value? It isn't listed in the "choose field"

find_real_file.png

pavan9885
Tera Guru

where is the workflow is it you are planning to call from Rest api if you are planning to create a update or create a record in the target record through workflow  pull the target table into the workflow and mention the choose fields conditions like when state is new or some thing like that and post the API call to get the workflow fired .

 

Let me know what is the target table you are planning to call in REST API 

I've created a basic approval workflow (using the problem table). I'm not sure what's the appropriate table to be used, I'm fine with any table for now. 

Basically, I need to know how to start a workflow from an external REST API. Please could you help me with the procedure?

Thank you,

 Shrisha.