Overview
The Run Node With Credentials X node allows you to execute any n8n node dynamically, injecting a specific set of credentials by their ID. This is particularly useful when you want to programmatically run a node (for example, an HTTP Request or a custom integration) with credentials that are determined at runtime, rather than statically configured in the workflow.
Common scenarios:
- Dynamically running different nodes based on incoming data.
- Executing nodes with user-supplied or context-specific credentials.
- Building meta-workflows that orchestrate other workflows or nodes flexibly.
Practical example:
Suppose you have a workflow where users can submit API requests with their own credentials. You could use this node to run an HTTP Request node using the credentials provided by each user, without hardcoding them into your workflow.
Properties
| Name | Type | Meaning |
|---|---|---|
| Credentials ID | String | ID of the credentials to use for the node being executed. |
| Node To Execute | JSON | The JSON definition of the n8n node you wish to execute dynamically. |
Output
- The output is the result of executing the specified node with the given credentials.
- The structure of the
jsonoutput field will match whatever the executed node returns. For example, if you run an HTTP Request node, you'll get its usual output. - If an error occurs and "Continue On Fail" is enabled, the output will include:
{ "json": { ...original input... }, "error": "...error message...", "pairedItem": 0 }
Dependencies
- n8n internal services: This node relies on n8n's workflow execution engine.
- Credentials: The specified Credentials ID must exist and be valid for the node you are executing.
- No external API keys or environment variables are required unless the executed node itself requires them.
Troubleshooting
Common issues:
- Invalid Credentials ID: If the provided Credentials ID does not exist or is not compatible with the node, execution will fail.
- Malformed Node JSON: If the "Node To Execute" property is not valid JSON or does not represent a valid n8n node, an error will occur.
- Missing Credentials in Node JSON: If the node JSON does not contain a
credentialssection, the node will throw:"There are no credentials in the node that is entered." - Error Handling: If an error occurs and "Continue On Fail" is not enabled, the workflow will stop and display the error. If enabled, the error will be included in the output as shown above.
How to resolve:
- Double-check the Credentials ID and ensure it matches the credential type expected by the node.
- Ensure the node JSON is correctly formatted and includes a
credentialsobject. - Use the n8n UI to export a node's JSON for reference.