Skip to content

n8n

Choose n8n if you built your AI agent as an n8n workflow with a webhook trigger. Mibo sends inputs to your webhook and can collect detailed workflow execution data for deeper analysis.

  1. Add your workflow

    Go to your project, click Add Platform, and select n8n.

  2. Enter your Webhook URL

    Paste the webhook endpoint URL of your n8n workflow. This is the address Mibo will send test inputs to.

  3. Enter your Workflow ID

    The ID of your n8n workflow. You can find this in the workflow URL in your n8n instance.

  4. Add your n8n API Key (optional but recommended)

    Providing your n8n API key enables Mibo to pull execution details directly from n8n’s API. This gives you richer trace data and more accurate analysis.

    • With API key: Mibo can poll n8n for full execution details, including every node’s inputs and outputs. This is the recommended setup.
    • Without API key: Mibo relies on the Mibo Testing Node (installed in your n8n workflow) to push trace data. This requires extra setup but works if you prefer not to share your API key.
  5. Configure the message template

    The message template defines the request body Mibo sends to your webhook. It uses placeholders that get replaced with real values each time a test runs:

    PlaceholderReplaced with
    {input}The test case’s input text
    {VARIABLE_NAME}The value of VARIABLE_NAME from the test case’s context
    {external_id}(Optional) The trace ID for this execution

    The default template is { "chatInput": "{input}" }. Customize it to match whatever your webhook expects.

    Example: if your workflow needs both the user message and a user ID from the test case context:

    {
    "chatInput": "{input}",
    "userId": "{USER_ID}"
    }

    With a test case context of { "USER_ID": "usr-123" }, Mibo sends "userId": "usr-123" on every request for that test.

    See context variables to learn how to define variables in your test cases.

  6. Choose a response node (optional)

    By default, Mibo auto-detects the AI node in your workflow (e.g., an AI Agent) and uses its output for evaluation. If your workflow uses a Respond to Webhook node or another node as the final output, you can tell Mibo to use that node instead.

    Use the quick-select buttons to pick a common node, or type a custom node name. Mibo uses substring matching (case-insensitive), so you don’t need the exact name.

    You can also specify a Response Text Path to extract a specific field from the node’s output. This uses dot notation to “navigate” into the JSON structure:

    Node outputPathResult
    {"output": "Hello"}outputHello
    {"data": {"answer": "Hello"}}data.answerHello
    {"items": [{"text": "Hello"}]}items.0.textHello

    Leave it empty to auto-detect — Mibo will look for common fields like output, text, or message.

  7. Adjust timing settings (if needed)

    If your workflow takes a while to process inputs, you may need to increase the timing settings:

    • Poll Interval: how often Mibo checks for results.
    • Timeout: how long Mibo waits before giving up.

    The default values work for most workflows. Only increase them if you’re getting timeout errors.

  8. Test your connection

    Click Test Connection to verify Mibo can reach your webhook and get a response.

n8n webhooks work differently from typical APIs: they acknowledge the request but don’t always return the result directly. Because of this, Mibo uses a two-step process:

  1. Send the input to your webhook.
  2. Collect the results either by polling n8n’s API (if you provided an API key) or by waiting for the Mibo Testing Node to push the data.

You have two options for getting detailed trace data from your n8n workflows:

If you provided your n8n API key, Mibo automatically polls n8n for execution details after sending each test input. No additional setup is needed in your workflow. This gives you:

  • Node input parameters (e.g. the URL on an HTTP Request node), so you can use expected_arguments to assert on them directly.
  • AI Agent tool calls — if your AI Agent uses tools (like a PostgreSQL query, HTTP Request, or Code tool), Mibo automatically detects which tools the agent called and what it sent to each one. You can verify these with expected_tool_calls inside a node_call assertion.

If you prefer not to share your API key, you can install the Mibo Testing Node in your n8n workflow. This node captures execution data and sends it directly to Mibo.

n8n supports passive testing. Use the n8n Testing Node to push execution data from production workflows to Mibo for automatic evaluation.

When creating tests with the Test Architect, you can upload your n8n workflow JSON export to help the AI understand your workflow’s structure. The AI will automatically detect testable nodes (AI agents, HTTP Request nodes, etc.) and suggest test targets.

To export your workflow: in n8n, open your workflow, click the three-dot menu, and select Download. Then attach the downloaded JSON file in the Test Architect chat, or paste its contents directly.

  • “Connection failed”: make sure your workflow is active and using the production webhook (not the test webhook).
  • “Timeout”: increase the timing settings in the platform configuration. Your workflow might need more time to process inputs.
  • “No trace data”: if you’re not using an API key, make sure the Mibo Testing Node is installed and correctly configured in your workflow.
  • “Webhook not found”: verify the webhook URL is correct and your workflow is activated.