Run Node With Credentials X (Improved)

Run any node with specified credentials - with dropdown selection

Overview

This node allows you to run any other n8n node configuration with a specified set of credentials. It is useful when you want to execute a node outside its original workflow context or override the credentials it uses without modifying the original workflow. Common scenarios include testing nodes with different credentials, dynamically running nodes from other workflows, or executing custom node configurations pasted as JSON.

For example, you can select an existing node from another workflow and run it with a new API key credential, or paste a node's JSON configuration directly and execute it with chosen credentials.

Properties

Name Meaning
Credentials ID Select the credentials to use for running the node.
Node Selection Method How to specify the node to execute: either "Select from Existing Nodes" in workflows or "Paste Node JSON".
Workflow (Shown if selecting existing node) Choose the workflow containing the node to run.
Node (Shown if selecting existing node) Choose the specific node within the selected workflow to run.
Node JSON (Shown if pasting JSON) Paste the full JSON configuration of the node to execute.
Override Credentials Whether to override the node's original credentials with the selected credentials. Defaults to true.

Output

The node outputs a single item per input item with the following structure in the json field:

  • executedNode: An object describing the node configuration prepared for execution, including:
    • name: The node's name.
    • type: The node's type.
    • credentials: The credentials object assigned to the node (with the overridden credentials if applicable).
    • parameters: The parameters of the node.
  • credentialsId: The ID of the credentials used.
  • overrideCredentials: Boolean indicating if credentials were overridden.
  • message: A confirmation message that the node configuration was prepared.

If an error occurs during processing and the node is set to continue on fail, the output will contain an error field with the error message and the index of the failed item.

This node does not produce binary data output.

Dependencies

  • Requires access to the n8n REST API with appropriate authentication to:
    • Fetch available credentials.
    • Fetch workflows and their nodes.
    • Fetch details of specific credentials.
  • Requires an API key or token credential configured in n8n to authenticate these requests.
  • No external services beyond the n8n API are required.

Troubleshooting

  • Common issues:

    • Not selecting both workflow and node when using "Select from Existing Nodes" method results in an error.
    • Providing invalid JSON in the "Paste Node JSON" option causes a JSON parsing error.
    • Selecting a node ID that does not exist in the chosen workflow triggers a "Node not found" error.
    • Missing or invalid credentials ID leads to failure in fetching credentials.
  • Error messages and resolutions:

    • "Workflow and Node must be selected": Ensure both workflow and node are selected when using the existing node selection method.
    • "Invalid JSON format for node configuration": Check and correct the pasted JSON syntax.
    • "Node with ID ... not found in workflow": Verify the node ID corresponds to a node in the selected workflow.
    • "Failed to load credentials: ..." or "Failed to load workflows: ...": Check API authentication and connectivity to the n8n instance.

Links and References

Discussion