WotNot Help Center
Create a ticketBook a demoProduct
  • 👋Welcome!
  • 🏁Getting Started
    • Building a chatbot
    • Testing a chatbot
    • Publishing your bot
      • Web
        • Embed chatbots on website
      • WhatsApp
        • Meta
        • 360Dialog
        • Twilio
        • GupShup
        • TechAlpha
      • Instagram
      • Facebook Messenger
      • SMS
      • Mobile app
      • API
    • Utility Tools
    • Contacts
      • Scheduling a Contact Report
      • Exporting a Contact List
      • Blocking contacts
    • Chatbot Appearance
      • Custom CSS
      • Image dimensions
      • Pop-up messages
  • ⚒️Bot builder
    • Action blocks
      • Trigger
      • Send message
      • Collect input
      • Buttons
      • Reply buttons
      • Carousel
      • Agent
      • Answer AI
      • Set AI
      • Send an email
      • List
      • Condition
      • Talk to human
      • Dynamic data
      • Javascript
      • Collect file
      • Form
      • Webhook
      • Flow
      • Jump
      • Options
      • Calendar
      • Delay
      • Codeblock
      • Slider
      • Image gallery
      • Send WhatsApp
      • Send SMS
      • Send Email
      • Send Status
      • WhatsApp flow
      • Catalogue
    • Outbound bots
      • Building One Off Campaign
      • Building Ongoing Campaign
    • Variables
    • Cloning bots
    • Requesting edit access
    • Connecting action blocks
    • Creating a loop
  • ✨AI Studio
    • Building a GPT chatbot
    • Knowledge base
    • Custom Answers
    • Functions
    • Prompts
    • AI credits
    • Refresh frequency
  • 💬Live Chat
    • Overview
    • Building a bot with live chat
    • Creating views
    • Adding labels
    • Saved replies
    • Settings
  • 🔗Integrations
    • Overview
    • HTTP request
    • Ready integrations
      • Google Calendar
      • Google Sheets
      • Google Analytics
        • Using Javascript
      • Salesforce
      • HubSpot
      • Calendly
      • Slack
      • Airtable
      • Zendesk
      • Freshdesk
      • DialogFlow
      • Zoho CRM
    • Events
    • Zapier
    • Public APIs
  • 💬WhatsApp Business API
    • Getting a WhatsApp API
      • Getting WhatsApp API (Old approach)
      • Sandbox WhatsApp API
    • Facebook Business Manager (FBM) Verification
    • Creating a WhatsApp Template
    • Cost
    • Messaging Limits, Quality Rating
    • Official Business Account (Green tick verification)
  • 📊Reporting
    • Overview
    • Chatbot Report
    • Agent Report
    • Outbound Report
    • Link analytics
    • Weekly email report
  • 🛠️Troubleshooting
    • Getting notification for leads
    • JS functions to trigger chat widget
    • Opt-out management
    • Setting up link tracking
    • How do I hard refresh my browser?
    • Cookies
    • Notifications
    • Tracking Facebook Pixel
    • Setting up SSO login
    • Inviting teammates
    • Teams
  • 🧑‍💻Support
    • Creating a ticket
    • Book a demo
    • Purchasing a subscription
    • Cancelling a subscription
    • Refund policy
    • Reset password
    • Deleting account
Powered by GitBook
On this page
  • Endpoint
  • Timeout
  • Response

Was this helpful?

  1. Bot builder
  2. Action blocks

Webhook

Listens to events that occur on this event and proceeds to the next step in the flow.

PreviousFormNextFlow

Last updated 10 months ago

Was this helpful?

Available on the PREMIUM plan and above

Webhooks are used to listen to events occurring on a third-party app.

It is most commonly used for use cases like payment collection, where the chatbot waits for the third-party payment processor to call the webhook once payment is received.

Endpoint

Set this webhook endpoint on the application that will publish the event.

When invoking this endpoint, it is mandatory to return the conversation_key as part of the response payload; if it is not present, our systems will not consider it a successful response.

You can use the variable Conversation URL to extract the conversation_key value from it.

Use a javascript action block before using the webhook block with this code.

const conversation_url = "Conversation URL";

// Function to extract the conversation key from the URL
function getLastPartOfUrl(url) {
    // Split the URL by slashes
    const parts = url.split('/');

    // Return the last part
    return parts[parts.length - 1];
}

// Retrieve the conversation key from the URL
const conversation_key = getLastPartOfUrl(conversation_url);

// Sets the conversation key into a new variable
wn.setConversationVariable("conversation_key", conversation_key);

// This variable will be used to push the conversation_key to the third-party app.

Timeout

The chat flow will wait for this webhook call for the specified duration.

If the webhook is not invoked in the given timeframe, the chat flow will proceed in the FAILURE flow.

Set the duration between 1 and 300 seconds.

Response

When a webhook response is received, you can map the fields that are to be saved into variables.

You can map a maximum of 50 variables.

⚒️