Can we create flow using script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hey All,
I wanted to know that can we create flow using script in ServiceNow and which table stores which part of flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
What is the business case?
You can use a script to trigger a Flow, but why would you want to flow from script? We generally use Flow Designer to reduce the amount of custom code we need to write and maintain. If you're triggering everything through scripts, it defeats the purpose of using Flows.
Could you share the specific requirement so we can suggest the best approach?
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hey @Dr Atul G- LNG ,
I want to create a flow, its trigger conditions and actions using script.
I was able to create the flow but wasn't able to write the script to create the trigger and actions using scripting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
What are you trying to achieve by creating a custom solution for this? It's available out of the box (OOTB), mate. By building a custom implementation, you're just adding unnecessary technical debt. Consider using the OOTB functionality unless there is a strong business requirement that it cannot meet.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
I never came across any customer requirement to create a flow from script.
Flows are meant for low-code, no-code requirements and if you are creating flow using script then I think it's not recommended.
Flows are meant to be created from UI.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Can you validate your requirement again- is it call flow from script OR create flow using script?
Flows are intended to provide a low-code way of designing and managing process logic. If an entire flow could be created through scripting alone, it would undermine the purpose of having a flow designer. Therefore, while scripts can be used for specific actions or to trigger flows, the overall flow structure is expected to be built and maintained through the visual designer.
You can’t build a complete flow solely through server-side scripting, since the flow structure depends on the visual logic designer.
However, you can use scripts to automate specific actions within a flow or to trigger flows programmatically.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti