Table of Contents

How to integrate Landbot with n8n

Pau Sanchez Updated by Pau Sanchez

This guide walks you through connecting Landbot with n8n using our integration n8n block, enabling you to automate workflows and pass data between the two platforms seamlessly.

Overview

The n8n block allow Landbot to send data to n8n in real-time, triggering automated workflows based on user interactions in your chatbot. This integration is perfect for capturing leads, processing form submissions, or triggering complex automation sequences.

Prerequisites
  • An active n8n account (cloud or self-hosted)
  • Basic understanding of JSON data structure

Part 1: Setting Up n8n

Step 1: Configure the Webhook Trigger

First, you'll need to create a webhook endpoint in n8n that Landbot can send data to.

  1. Create a new workflow in n8n
  2. Add a Webhook node to your workflow:
    • Click the "+" button to add a new node
    • Search for "Webhook" and select the Webhook Trigger node
  3. Configure the Webhook node:
    • HTTP Method: Select POST
    • Path: Enter a custom path (e.g., landbot-webhook) or leave default
    • Authentication: Set to None (or configure as needed for your security requirements)
    • Respond: Set to Using 'Respond to Webhook' Node
  4. Copy the Webhook URLs:
    • Test URL: Use this for initial testing
    • Production URL: Use this in your live Landbot flow

Important: The Test URL is temporary and only works while your workflow is actively open in n8n. Always switch to the Production URL before deploying your bot.
Step 2: Add and Configure the 'Respond to Webhook' node

Configure how n8n responds to Landbot's webhook request.

  1. Add a 'Respond to Webhook' node after your Webhook trigger

  1. In the 'Respond to Webhook' node configure the settings:
    • Respond With: Select JSON
    • Response Body: Leave as is the example, or edit with params you want to send back to Landbot
  2. (Optional) Add processing nodes:
    • After the Webhook trigger, add any nodes you need for processing (e.g., Set, Function, HTTP Request)
    • These will execute before the response is sent with the 'Respond to Webhook' node
  3. Save and activate your workflow
  4. Copy the Production URL for use in Landbot

Part 2: Configuring Landbot

Step 3: Set Up the Webhook Block

Now you'll configure Landbot to send data to your n8n webhook.

  1. Add a n8n block to your Landbot flow:
    • Open your bot in the Landbot builder
    • Add a new block by clicking the "+" button
    • Select Integrationsn8n
  2. Configure the Workflow:
    • URL: Paste your n8n Production URL (not the Test URL)
    • If testing first, you can temporarily use the Test URL, but remember to update it before going live
  3. Configure the Send data:
    • Set up the keys and fields with the landbot fields or text you would like to send to n8n

    Tip: Use Landbot variables (prefixed with @) to dynamically insert user responses

  1. Add Test Values:
    • Fill in sample data for each field to test the connection
    • Example test values:
      • Name: "John Doe"
      • Email: "john@example.com"
      • Phone: "+1234567890"
      • Message: "Test message"
  2. Test the Connection:
    • Click the Run test button
    • Wait for a successful response
    • Verify in n8n that the webhook received the test data
  3. Store n8n webhook responses values to Landbot Fields (Optional):
    • If n8n sends data back in the response, you can map it to Landbot variables
    • Click the Add field mapping button
    • In the Response field dropdown, select the key value from the response and set up the field in Landbot where you would like to store it.
    • Example: Map myField to @myfield
  4. Save your configuration by clicking on "APPLY"

Testing Your Integration

  1. In n8n:
    • Ensure your workflow is activated (toggle in the top-right corner)
    • Open the Executions tab to monitor incoming webhooks
  2. In Landbot:
    • Use the Preview feature to test your bot
    • Complete the flow up to the n8n block
    • Check that data appears correctly in n8n executions
  3. Verify Data Flow:
    • Confirm all fields are mapping correctly
    • Check that any response data from n8n is properly captured in Landbot
    • Test edge cases (empty fields, special characters, etc.)

Was this article helpful?

How to Integrate Landbot with n8n using Webhooks

Contact