- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 04:14 AM
Hi All,
i have a flow for decomissioning a pc, the flow should kick off if an update is done from AD on the computer table.
when the computer gets disabled in AD and this information gets updated in servicenow, the flow should kick of and created the requested item that is attached to the flow.
users are also able to manually create the request but when the request is created automatically the approval in the flow should be skipped.
im not sure how to start is there anyone who can hellp me on the way
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 05:35 AM
I don't think you can pass any other input to flow
You can do this
1) create a hidden variable on your catalog item and set it via onLoad with some value and hide that variable always
2) then check that variable value in your flow
3) if it has value then it means it is submitted via manual request
4) when flow triggers via BR this variable will be empty
This will help you to skip approval
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 04:26 AM
ensure for this variable Visible on summaries checkbox is unchecked.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 04:14 AM
@Ankur Bawiskar thanks!
i do have a followup question.
the BR is running on the cmdb_ci_computer table because i need to look at a field on the computer form if that gets updated from AD it needs to run the BR and create the catalog item.
i need to set the requested for via that BR and some other field, how can i do that ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 04:31 AM
since you can't pass input to flow it would be difficult to know which computer record initiated the flow?
Set unique session variable and get that in flow variable and set the requested for
Something like this
How to use session variable in service now
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 04:53 AM
My suggestion to go:
- Create a subflow which contains the actions and tasks
- Create a main flow to attach it to a catalog item. In the main flow you can call the subflow and set a parameter which shows the manual start.
- Call your subflow also from a business rule (or any other helpful script like scripted webservice) and set the parameter to show the automated start
- In the subflow test the parameter value and skip the approval task for example.
I hope that helps!
I will always try to give a meaningful and valid answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 05:23 AM
Hello @jean-pauldehaas ,
You can try as below:
Open your flow and click Create code snippet.
Use the server side code inside that function as like below
Uncomment the yellow highlighted line and comment the red highlighted line as you are dealing with background.
You can use this code directly in your business rule, and the flow will trigger.
Please mark this as "correct" and "helpful" if you feel this answer helped you in anyway.
Thanks and Regards,
Ashish