Action in a subflow not executing, but status showing as 'Completed'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2025 07:08 AM
Hello devs,
I have come across a strange issue in flow designer. So, I have created subflow, and there is a custom action being called in the subflow, for each of the records being looked up. Suppose there are 3 records in the lookup action, the subflow will be executed 3 times.
I am executing the flow with a script. Even though the flow is executing, and the look up record action is also returning 1 record (as expected), the action is not executing at all.
One of the reasons that I could think of, is the error that I am getting when I am loading the steps of the subflow execution (please see the screenshot attached).
For context, I am looking up attachment records with Sys_Ids.
PS- Also, when I am running a test execution for the subflow, the result is the same.
This is turning out to be a major blocker, so any help would be appreciated.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2025 07:18 AM
it clearly says some access issue.
Ensure Run as -> System user for the custom flow action and then test
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
09-12-2025 08:23 AM
Hi Ankur,
Thanks for your response. I did try with both 'User who initiates session', and 'System User', but the issue is still the same.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2025 07:30 AM
Hi @sd2097 ,
This usually isn’t your flow logic that’s broken, but permissions / scope issues.
To fix this, you can try the following:
Check sys_attachements table ACLs
Make sure the user/role running the flow (e.g., system, flow_operator, or your integration user) has read access.
Check App Scope restrictions
If your custom action is in a scoped app, ServiceNow may block access to system tables like sys_attachment.
Go to System Applications > Application Cross Scope Access
Look for entries allowing Read on sys_attachment. If missing, add one.
Check the Flow runtime user
Make sure Run as -> System user for the custom flow action and then test
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2025 08:17 AM
Hi @sd2097 ,
Thank you for marking my reply as helpful.
If my response helped, please mark it as the accepted solution so others can benefit as well.
Thanks & Regards,
Muhammad Iftikhar
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
