Calling Webhook


This tutorial walks you through creating a custom tool in FlowiseAI that calls a webhook endpoint, passing the necessary parameters in the request body. We will use Make.com to set up a webhook workflow that sends messages to a Discord channel.

Setting Up a Webhook in Make.com

  1. Sign up or log in to Make.com.

  2. Create a new workflow containing a Webhook module and a Discord module, as shown below:

    Workflow example
  3. From the Webhook module, copy the webhook URL:

    Webhook URL
  4. In the Discord module, configure it to pass the message from the webhook body as the message sent to the Discord channel:

    Discord module setup
  5. Click Run Once to start listening for incoming requests.

  6. Send a test POST request with the following JSON body:

    {
        "message": "Hello Discord!"
    }
    Sending POST request
  7. If successful, you will see the message appear in your Discord channel:

    Discord message

Congratulations! You have successfully set up a webhook workflow that sends messages to Discord. 🎉

Creating a Webhook Tool in FlowiseAI

Next, we will create a custom tool in FlowiseAI to send webhook requests.

Step 1: Add a New Tool

  1. Open the FlowiseAI dashboard.

  2. Click Tools, then select Create.

    Creating tool in FlowiseAI
  3. Fill in the following fields:

    FieldValue
    Tool Namemake_webhook (must be in snake_case)
    Tool DescriptionUseful when you need to send messages to Discord
    Tool Icon SrcFlowise Tool Icon
  4. Define the Input Schema:

    Input schema example

Step 2: Add Webhook Request Logic

Enter the following JavaScript function:

const fetch = require('node-fetch');
const webhookUrl = 'https://hook.eu1.make.com/abcdef';
const body = {
    "message": $message
};
const options = {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify(body)
};
try {
    const response = await fetch(webhookUrl, options);
    const text = await response.text();
    return text;
} catch (error) {
    console.error(error);
    return '';
}
  1. Click Add to save your custom tool.

    Tool added confirmation

Step 3: Build a Chatflow with Webhook Integration

  1. Create a new canvas and add the following nodes:

    • Buffer Memory
    • ChatOpenAI
    • Custom Tool (select make_webhook)
    • OpenAI Function Agent
  2. Connect them as shown:

    Chatflow setup
  3. Save the chatflow and start testing it.

Step 4: Sending Messages via Webhook

Try asking the chatbot a question like:

“How to cook an egg?”

Then, request the agent to send this information to Discord:

Sending message via agent

You should see the message appear in your Discord channel:

Final message in Discord

Alternative Webhook Testing Tools

If you want to test webhooks without Make.com, consider using:

More Tutorials

  • Watch a step-by-step guide on using webhooks with Flowise custom tools:

  • Learn how to connect Flowise to Google Sheets using webhooks:

  • Learn how to connect Flowise to Microsoft Excel using webhooks:

By following this guide, you can trigger webhook workflows dynamically and extend automation to various services like Gmail, Google Sheets, and more.