Webhooks

Modified on Tue, 27 Aug at 1:21 PM

A webhook workflow event is a way for OneBlink apps to provide other applications with a notification that a form submission has taken place. This allows custom, flexible integrations with your own backend systems or services.


Webhooks Events

 

By default, the notification will simply contain information that identifies the form submission, not the payload itself. This means the notifications are fast and lightweight, and give you full flexibility over what action you want to take when the workflow event is triggered.

 

For example, you may wish to simply update a status in your backend system, or you may want to take it a step further and request the full submission payload for backend integration or storage.

 

Types of Webhooks Events

 

There are two types of webhook events you may wish to use:

 

OneBlink Hosted API

Part of the OneBlink platform is API hosting - in the spirit of NoOps, our hosted API service allows your developers to simply write code and deploy, without needing to worry about infrastructure. The APIs are hosted using serverless technology for resiliency and scaling.

 

If you’re hosting your webhook script on the OneBlink platform you can easily access this by selecting the OneBlink Hosted API.

 

You will be shown a list of APIs, and once you select one, a list of all available routes for that endpoint. You will also need to configure a secret, for more details on Secrets check out the article.


Retry on failure 

If this switch is enabled then the submission will be automatically retried 5 times. If all 5 of the retries fail then a notification email will be sent to the app sending email address.



Custom URL

If you are hosting your own APIs, or using a middleware service such as Jitterbit, Mulesoft, Boomi, etc., then you can select the Custom URL webhook.

 

For this event, you can simply enter the full URL to your endpoint, and OneBlink will send the webhook notification to that URL when a submission takes place.



 

Payload


The payload for webhooks contains information that allows you to identify the submission:

 

  • formId

    • The ID number of the form that was submitted

  • externalId

    • An optional custom ID, if you passed one when invoking the form

  • submissionId

    • The ID for the submission

  • submissionTimestamp


The payload will be passed as JSON data.


Payload Example

{
  "formId": 160,
  "externalId": "external identifier",
  "submissionId": "85fad0a4-b778-4aea-a6e7-671d84d58156",
  "submissionTimestamp": "2019-01-31T09:15:00.000Z"
}

How To Get My Form Data

 

Once your webhook is triggered, if you would like to retrieve your form data this can be done using the OneBlink SDK.


The current SDK is written in NodeJS, and can be used to include in your server side code to retrieve your submission data (as well as functions like pre-populating a form, for example).


The SDK is hosted on Github and NPM, and so can be easily included in your projects.


Quick Tip: Pass the form submissionId to the getSubmissionData() function to retrieve the submission data.


Get Help


If you have any questions or would like assistance with setting up your Email actions please contact us via this support portal or email support@oneblink.io. We are happy to assist in any way we can.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article