Skip to content

Custom webhook action

The Custom Webhook Action in Stack allows you to seamlessly integrate with external systems by sending real-time data using HTTP methods like POST, GET, PUT, and DELETE. This feature facilitates automation, data exchange, and interaction with third-party services, APIs, and custom applications without any coding required.

Custom Webhook

The Custom Webhook Action lets you send HTTP requests to specified URLs, enabling integration with external services for automated data exchange. It supports various HTTP methods, customizable headers, query parameters, and multiple authentication options to meet the requirements of any third-party service.

  • HTTP Methods: POST, GET, PUT, DELETE
  • Custom Headers & Query Parameters: Pass authentication, content-type, or other necessary data
  • Authorization Methods:
    • Basic Auth: Requires a username and password
    • Bearer Token: Requires a token from the platform
    • API Key: Requires a key-value pair of the key name and its value
  • Data Mapping: Autocomplete suggestions to map custom values like contact info, lead status, and more
  1. Choose the Action Type:

    • Select “Custom Webhook” from the list of available actions in the workflow builder.
  2. Name Your Action:

    • Enter a descriptive name, such as “Send Data to External API.”
  3. Enter the Webhook URL:

    • Provide the URL of the external system’s endpoint where the data should be sent (e.g., a CRM, payment gateway, or custom API).
  4. Select HTTP Method:

    • Choose from POST, GET, PUT, or DELETE depending on the type of data operation required by the external service.
  5. Select Authorization Method (Optional):

    • Choose the necessary authorization method such as API keys, Bearer Tokens, or Basic Auth to ensure secure communication with the external service.
  6. Configure Headers & Query Parameters (Optional):

    • Add any required headers like Authorization: Bearer <API_KEY> or content-type headers to define the data format (Content-Type: application/json).
    • Use query parameters to pass additional information, filter data, or adjust the external API’s response.
  7. Map Data:

    • Insert relevant data (e.g., contact name, email, phone number) into the request body. Structure the payload in JSON or another format required by the external system.

    Example Payload:

    {
    "first_name": "`{{contact.first_name}}`",
    "last_name": "`{{contact.last_name}}`",
    "email": "`{{contact.email}}`",
    "phone": "`{{contact.phone}}`"
    }
  8. Save and Activate the Workflow:

    • Once set up, activate the workflow. The webhook will trigger and send data in real time based on the workflow conditions.

A business wants to send contact information to an external CRM whenever a new lead is created in your system.

  1. Create Workflow Trigger:

    • Set up a workflow trigger for when a new lead is created.
  2. Add Custom Webhook Action:

    • Choose “Custom Webhook” and name it “Send Lead Data to CRM.”
  3. Webhook URL:

    • https://api.externaltestcrm.com/leads/create
  4. HTTP Method:

    • POST
  5. Payload:

    {
    "first_name": "`{{contact.first_name}}`",
    "last_name": "`{{contact.last_name}}`",
    "email": "`{{contact.email}}`",
    "phone": "`{{contact.phone}}`"
    }
  6. Headers:

    • Add an API key to authenticate the request
    • Authorization: Bearer xyz123
    • Content-Type: application/json
  7. Test the Webhook:

    • Use a tool like Webhook.site or Postman to confirm the data is correctly sent and received.
  8. Save and Activate:

    • Once activated, the webhook will automatically send lead data to the CRM whenever a new lead is created.

Every new lead is synced with the external CRM, improving automation and reducing manual data entry.

Can't find what you need? Call or text +1 787 665-9212 or email [email protected].© Stack · Privacy · Terms