- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2019 05:57 AM
Hi!
I was wondering if it's possible to trigger a flow from a workflow (the flow and the workflow is in the same scope as I am working in). How can I run a flow in the workflow?
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2019 06:36 AM
Hello Nora,
Here is the blog shared by Dave , which would help you to call a flow from a server side script, As you say that you wanted to call a flow from a workflow , the API shared by Dave which is introduced in London Release Of servicenow Should help you achieve your requirement.
Note : Only available for instances in London or newer versions .
Thanks,
Siva
Mark this response as correct/helpful if that really helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 10:52 AM
Great helpful article! It works except for the issue below. Any help is appreciated!
I copied the Code snippet like
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 11:55 AM
Disregard. You comment out the "Start Asynchronously" line and uncomment the line for "Execute Synchronously".
(function() {
try {
var inputs = {};
inputs['table_name'] = 'Table Name';
inputs['request_item'] = current; // GlideRecord of table: sc_req_item
// Start Asynchronously: Uncomment to run in background.
// sn_fd.FlowAPI.getRunner().flow('global.shane_test').inBackground().withInputs(inputs).run();
// Execute Synchronously: Run in foreground.
sn_fd.FlowAPI.getRunner().flow('global.shane_test').inForeground().withInputs(inputs).run();
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
})();