Profile Picture of the author

Integration Inbound Webhook

on 11-26-2024 12:00 AM by SnapApp by BlueVector AI

379

An inbound webhook is a way for an application to provide real-time data or notifications to another system via HTTP requests.

It allows external services to push information to your application by sending HTTP POST requests to a specific URL endpoint you provide.

Inbound webhooks are commonly used for integrations where instant updates or event-driven communication is needed, such as receiving notifications from a payment gateway, chat service, or any other external API.

Table of Contents

Steps to create an Inbound Webhook

  1. Navigate to Settings of the User menu from the top bar.
  2. Tap on Automation from the left nav > Integrations.
  3. Tap on Add New (+) on the top right corner.
  4. Provide a Name for the integration > select Inbound Webhook as the type
  5. Choose the Object ID from the dropdown list > Enable Active.

  6. Add Response Body in JSON format. This will be used to fill up the records using the data received in the notification request.

    For example, your selected object has a field called “asana_task_id”. Once you receive a notification, a new record will be created in your object, with asana_task_id = <the value you received in the notification>

    Similarly, the request body may contain multiple fields. Make sure that your object has those fields.

Schema

JSON body

  1. Under Response Actions Add suitable workflows by clicking on the + sign on the right > Save.

    This is the workflow that will run, once this inbound webhook receives a notification. You can also add this later, under “Webhook actions” section of the webhook details page.

Add workflow

  1. Enable the checkbox for Require Validation to verify the authenticity of the incoming data.

  2. Add Validation Condition which is the set of criteria or rules that incoming data must meet before it is processed by the receiving application. These conditions ensure that the data received is legitimate, secure, and correctly formatted.

    For example, You might only allow the requests with a specific header, say X-Hook-Secret. Put HEADER:"X-Hook-Secret" as the validation condition

  3. Add Validation Function which is a process or set of rules designed to verify the authenticity and integrity of incoming data. It ensures that the data received from the webhook is from a trusted source and has not been tampered with.

    For Example, When Establishing a Webhook with Asana, SnapApp will have to relay back the same X-Hook-Secret back to Asana (as a part of Asana’s Security Process)

validation

  1. Click save! Done! Now, you have an active inbound webhook that will continue to listen for notifications. Once it gets a notification, it will run the workflow on the particular record received.

Now, You might need to use snapapp as target server for establishing a webhook. (For example, in Asana, you need to provide a target_server_url)

Put the url of target server as:

https://<YOUR_SNAPAPP_INSTANCE>.snapapp.com/webhooks/<YOUR_WEBHOOK_ID>

For example, if you created an inbound webhook in the instance “dev” with the id as “1122-3344-5566-7788” , your target_server_url will be https://dev.snapapp.com/webhooks/1122-3344-5566-7788


Thank you for following these steps to configure your SnapApp components effectively If you have any questions or need further assistance, please don’t hesitate to reach out to our support team. We’re here to help you make the most out of your SnapApp experience.

For support, email us at snapapp@bluevector.ai


Generate Text