We’re experiencing an issue where workflows triggered via REST API are not executing assigned flow actions as expected. The workflow initiates successfully, but flow actions that should be assigned to specific users or groups remain in a pending state indefinitely.
Our API payload includes the workflow context variables and user assignments according to documentation. Flow designer mapping appears correct when testing manually through the UI. However, when the same workflow is triggered via API call, the flow actions don’t get assigned properly.
POST /api/now/workflow/execute
{
"workflow_id": "wf_approval_process",
"context": {"assigned_to": "user_group_123"}
}
Workflow execution logs show the workflow as ‘Active’ but no activity records are created for the flow actions. This is causing SLA breaches for time-sensitive approvals. Has anyone encountered similar behavior with API trigger parameters not properly mapping to flow action assignments?
I’ve seen this before. The issue is usually related to how the context variables are passed in the API payload versus how Flow Designer expects them. When you trigger via UI, ServiceNow automatically resolves user references, but API calls need explicit sys_id values.
Check if your ‘assigned_to’ field is passing a group name string instead of the actual sys_id. Flow Designer won’t automatically resolve group names from API context.
Thanks for the suggestion. I verified our payload and we are passing sys_id values for the user groups. The workflow execution logs show the context variables are received correctly, but there’s no transition from workflow initiation to flow action assignment. It’s like the flow action stage is being skipped entirely when triggered via API.
Are you using the correct API endpoint? There’s a difference between /api/now/workflow/execute and the Flow Designer-specific trigger endpoints. Legacy workflow engine APIs don’t always play nicely with Flow Designer actions. Also, check your Flow Designer version - Utah had some known issues with API triggers in early releases that were patched later.
That makes sense. We were indeed using the legacy workflow API. Let me test with the Flow Designer-specific endpoint and report back.
I agree with Carlos. We had almost identical symptoms and discovered we needed to use the Flow Designer REST API endpoint instead: /api/now/flow_designer/trigger. This endpoint properly handles flow context and action assignments. The generic workflow execute endpoint doesn’t fully support Flow Designer constructs, especially for assigned activities.