• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

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