sarah_bioni
ServiceNow Employee
ServiceNow Employee

Issue

When executing a Flow Designer action that relies on a Spoke connection, you may encounter the following error:

 

sarah_bioni_1-1741021772148.png

 

There was an error executing the Action: Bad Request. The current operation ended in state: ERROR.
Detail: Error: Error while retrieving Connection Record for Connection ID - [sys_id].
(Process Automation.[sys_id]; line)

This error indicates that the action cannot retrieve the connection record for the specified Connection ID, preventing the flow from executing correctly.


Root Cause

The issue is related to a mismatch between the Spoke Connection Alias and the Application Scope of the connection record. This often occurs when:

  • The connection alias belongs to a specific Spoke (e.g., XXX Spoke), but the connection record was created under a different application scope (e.g., YYY Spoke).

  • The credentials associated with the connection are in the Global scope instead of the expected application scope.

Since Flow Designer actions rely on the correct connection records during runtime, the scope mismatch causes the retrieval to fail, resulting in the error.


Solution

To resolve this issue, follow these steps to ensure consistency in scope for the Spoke connection and credentials:

  1. Verify the Connection Alias Scope

    • Navigate to Connections & Credentials > Connection Aliases.

    • Locate the connection alias associated with the Spoke you are using.

    • Ensure that it belongs to the correct application scope (e.g., XXX Spoke).

  2. Check the Connection Record Scope

    • Navigate to Connections & Credentials > Connections.

    • Find the connection record (Sys ID provided in the error message).

    • Confirm that it is in the same application scope as the Spoke connection alias.

  3. Review Credential Scope

    • Go to Connections & Credentials > Credentials.

    • Ensure that the associated credentials are within the same application scope as the Spoke (not in the Global scope unless explicitly required).

  4. Regenerate Connection and Credential Records

    • If there is a mismatch in scope, delete the existing connection and credential records.

    • Follow the official ServiceNow documentation to recreate the connection and credential records within the correct application scope.

  5. Test the Flow Action Again

    • Once the new connection and credentials are in place, rerun the flow action to verify that the issue is resolved.

    • action again to verify that the issue is resolved.


Prevention Tips

  • Always create Spoke connections and credentials in the same scope as the Spoke itself.

  • Avoid modifying Out-of-the-Box (OOB) configurations unless necessary.

  • When creating new connections, double-check the Application Scope before saving.

  • Follow official ServiceNow documentation for best practices on configuring Spoke connections.

By ensuring proper scope alignment, you can prevent runtime errors and improve the reliability of Flow Designer actions leveraging Spoke connections.

Version history
Last update:
‎03-03-2025 09:13 AM
Updated by:
Contributors