Skip to main content

Run an n8n Workflow

n8n is a powerful workflow automation platform. ConsoleX can call n8n workflows as tools, which extends what models can do in a conversation. n8n workflows can be hosted on n8n Cloud or self-hosted infrastructure.

Basic flow

  1. Build an n8n workflow that starts with Webhook Trigger and ends with Respond to Webhook, returning JSON.
  2. In ConsoleX, create a tool with interface type n8n, and configure its description, webhook URL, and API key if required.
  3. Add the tool to a conversation so the model can call it when needed.

Detailed steps

Configure trigger and input handling in n8n

Your n8n workflow should start with a Webhook Trigger node and end with Respond to Webhook. The response is best returned as JSON, because the object in the response body becomes the tool result in ConsoleX.

Optional auth setup in n8n

If you want token-based authentication, configure Header Auth in the Webhook Trigger and create a credential with:

  • Name: Authorization
  • Value: Bearer <your_auth_token>

Configure the workflow response

Make sure the workflow ends with Respond to Webhook and that the response body is JSON, because that JSON object is what ConsoleX passes back to the model.

Create the n8n tool in ConsoleX

When creating the tool:

  • Define a JSON Schema that matches the input parameters expected by the workflow.
  • Enable tool calling and choose GET or POST depending on how your Webhook Trigger receives parameters.
  • Set the interface type to n8n.
  • Use the same webhook URL as the one configured in n8n.

The Test URL can be used during development, but it only works for one-off test calls. After the workflow is published, the Production URL can be used repeatedly.

If your n8n workflow requires an auth token, enter it into the tool’s API key field in ConsoleX.

Choose the return handling mode you want, then save the tool.

Example workflow

Here is a sample n8n weather workflow you can save locally and import for reference:

Weather workflow