Action in a subflow not executing, but status showing as 'Completed'

sd2097
Tera Guru

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

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@sd2097 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

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

M Iftikhar
Mega Sage

Hi @sd2097 ,

This usually isn’t your flow logic that’s broken, but permissions / scope issues.

To fix this, you can try the following:

 

  1. 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.

  2. 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.

  3. 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.

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