How to Use Form Webhooks in Taku

This quick guide will show you how to effortlessly set up webhooks for your forms, enabling you to send emails, trigger custom actions, or even integrate with other applications whenever a user submits a form on your website.

Setting Up a Webhook

When you create a form in a Taku message, you'll notice an option for "Webhook." This is where the magic happens. Simply enter the URL (endpoint) of the server where you want Taku to send data each time your form is submitted.

Understanding Your Webhook Data

Whenever someone fills out and submits your form, Taku will instantly send a POST request to your specified endpoint. This request will carry a payload with valuable information, including:

  • space_id: Unique identifier for your space.
  • message_id: ID of the message that contains the form.
  • user_id: Unique ID of the user who submitted the form.
  • user_email: The email address of the user (if provided).
  • user_name: The name of the user (if provided).
  • data: An array of the form inputs submitted, each with an input_id and the value entered by the user.

Here's a snapshot of what the data payload looks like:

1
{
2
"space_id": "mock_space_id",
3
"message_id": "1",
4
"user_id": "a31af103-caee-1b71-an01-0df29e3af46n",
5
"user_email": "example@mail.com",
6
"user_name": "John Doe",
7
"data": [
8
{
9
"input_id": "d203ea459104436d825201b2a29f0792",
10
"value": "Form message"
11
}
12
]
13
}

What You Can Do with Webhook Data

The possibilities are nearly limitless! Here are just a few things you can do with the data received through webhooks:

  • Send Automated Emails: Congratulate users on completing a form, or send them further instructions.
  • Trigger Custom Tasks: Update your CRM, start a workflow, or even send SMS notifications.
  • Integration: Use the data to integrate with other platforms or services for enhanced user experiences.