• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

Steps to Set Custom Response in Pabbly Hook

Custom responses​

A Custom Response allows you to control the response that your webhook sends back to the source of a request. This can be useful if you need to:
  • Modify the content type of the response (e.g., JSON, plain text)
  • Dynamically adjust the response content based on request data (such as data in the request body, query parameters, or headers)
  • Tailor responses based on specific requirements from external systems or API integrations.

Why Use a Custom Response?​

Custom responses are helpful when:
  1. You want to dynamically replace parts of the response with incoming request data.
  2. You need to meet a specific content-type requirement, especially when working with APIs that expect responses in formats other than JSON.
  3. You aim to streamline response handling, directly from the webhook.
Some API vendors modify their behavior based on the response they receive from a request. For these providers, pabbly hook supports setting custom responses to satisfy their requirements.

How to Set a Custom Response in Pabbly Hook​

To set a custom response, follow these steps:
  1. Navigate to the Custom Response Section: In Pabbly hook, locate the connection where you want to apply a custom response. Under the hook settings, find the "Custom Response" section.
  2. Activate the Custom Response: Mark the custom response as active to enable it for the webhook.
  3. Configure the custom response using Content Type and Content.
  4. Specify the Content Type: Choose the appropriate content type (e.g., application/json, text/plain) to ensure the response meets any specific format requirements.
  5. Define the Custom Response Content: Customize the response content with placeholders to insert request data dynamically.
    • Use $request.body.<key>$ to replace placeholders with values from the request body.
    • Use $request.query.<key>$ for values from query parameters.
    • Use $request.headers.<key>$ for values from headers.

      1730454343900.png
  6. Once satisfied with the custom response, click Save.
  7. Now you can send the webhook and check the custom response(Below is the screen shot for your reference).
    1730456039071.png
    1730456080251.png

  8. Now you see the custom response while triggering the webhook(Below is the screen shot for your reference).
    1730456378325.png
    1730456535055.png
Note: If there is no key provided then the custom response value will be empty for that key(Below is the screen shot for your reference).
Example : I will not send name in body.

1730456834885.png
 
Last edited:
Top