Using webhooks

Deftform allows you to connect to third-party services by sending a webhook every time a form is submitted.

Creating a webhook endpoint

To get started with webhooks, you will need to create a new endpoint in the workspace settings. You can create as many endpoints as you want.

Connecting to a form

After creating the endpoint, you then can edit any of your forms and add this webhook as a connection.

Payload

The payload has a data array which looks something like this:

"data": [
    [
        {
            "label": "Full name",
            "response": "John Doe"
        },
        {
            "label": "Email address",
            "response": "john@example.com"
        },
        {
            "label": "CV",
            "response": [
                "filename-abc.pdf|https://userdata.deftform.com/full-path-to-file/filename-abc.pdf"
            ]
        }
    ]
]

There is always only a label and response attribute. The label is the exact label you have typed when you created the form. If you update the form and change the label, the change also reflects in the webhook payload. 

Testing webhooks

We recommend a service like http://webhook.site to get started with testing your implementation. You can test the endpoint without submitting a form with the "Send test" option when creating / editing an endpoint.


Was this article helpful?