Skip to main content

Webhooks

Webhooks allow Told to send data to external services in real time when specific events occur, such as a user completing a survey.

What is a webhook?

A webhook is an HTTP callback triggered by an event. When the event occurs, Told sends a JSON payload to a URL you specify. This enables automation without polling — your service receives data as soon as it's available.

Use cases

  • Send a Slack notification when someone completes a survey
  • Add survey responses to a Google Sheets or Notion database
  • Send a follow-up email to respondents
  • Update a CRM with user feedback
  • Trigger custom backend logic based on survey data

Setting up a webhook

  1. Open your survey
  2. Go to the Connection tab → Webhook
  3. Click Add a webhook
  4. Configure:
    • Name — A label for your reference (no functional impact)
    • URL — The HTTPS endpoint that will receive the data
    • Event — Which event triggers the webhook

Available events

EventTriggerEvent type in payload
Answer surveyUser completes and submits the entire surveysurveyFormAnswer
AnswerUser submits an answer to a single questionsurveyAnswer
Answer NPSUser submits an NPS question answersurveyNPSAnswer

Payload structure

All webhook payloads follow this structure:

{
"eventId": "string — unique webhook event ID",
"eventType": "string — surveyFormAnswer | surveyAnswer | surveyNPSAnswer",
"createdAt": "string — ISO-8601 timestamp",
"data": "object or array — event-specific data"
}

Answer survey payload

When a user completes a full survey, data is an array of all answer objects:

{
"eventId": "6399ad818654c700157cf29a",
"eventType": "surveyFormAnswer",
"createdAt": "2022-12-14T11:03:29.194Z",
"data": [
{
"id": "6399ad568654c700157cf14a",
"createdAt": "2022-12-14T11:02:46.574Z",
"kind": "SurveyAnswerChoice",
"question": {
"id": "6399a2a58654c700157cbdae",
"content": "What is your favourite feature?",
"kind": "SurveyQuestionChoice",
"choices": [
{ "id": "...", "content": "Feature n°1", "position": 0 },
{ "id": "...", "content": "Feature n°2", "position": 1 }
]
},
"choices": [
{ "id": "...", "content": "Feature n°1", "position": 0 }
],
"author": {
"id": "639c3c221bf88007336128c8",
"name": "Tester #397",
"deviceType": "phone",
"hiddenFields": [
{ "key": "email", "value": "[email protected]" }
]
}
}
]
}

Answer payload (single question)

When a user submits a single answer, data is a single object:

{
"eventId": "6399ad7a8654c700157cf1a2",
"eventType": "surveyAnswer",
"createdAt": "2022-12-14T11:03:22.310Z",
"data": {
"id": "6399ad7a8654c700157cf18e",
"content": "I love this feature!",
"kind": "SurveyAnswerText",
"question": {
"id": "6399a28b8654c700157cbd48",
"content": "Why is this your favorite feature?",
"kind": "SurveyQuestionOpen"
},
"author": {
"id": "639c3c221bf88007336128c8",
"name": "Tester #397"
}
}
}

Answer types reference

Question typeAnswer kindContent field
Multiple ChoiceSurveyAnswerChoicechoices array with selected options
Open TextSurveyAnswerTextcontent as string
Opinion ScaleSurveyAnswerNumbercontent as number (1-5 or 1-10)
NPSSurveyAnswerNumbercontent as number (0-10)
MessageSurveyAnswerDefaultNo content (user viewed the message)
Contact InfoSurveyAnswerContactContact fields