---
title: "Survey automations"
description: "Run a workflow when someone completes a survey: follow up with detractors, open a ticket, update the contact, call a webhook. Plus what happens to automations that listened to survey tickets."
url: https://docs.gleap.ai/en/articles/704-survey-automations
collection: "Surveys"
updated: 2026-11-01
language: en
---

# Survey automations

Run a workflow when someone completes a survey: follow up with detractors, open a ticket, update the contact, call a webhook. Plus what happens to automations that listened to survey tickets.

Survey responses are not tickets, so automations react to the response itself. There are three ways to act on a completed response:

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Way</p></th><th colspan="1" rowspan="1"><p>Where</p></th><th colspan="1" rowspan="1"><p>Best for</p></th></tr><tr><td colspan="1" rowspan="1"><p><strong>Survey automation</strong> (workflow)</p></td><td colspan="1" rowspan="1"><p>Automation → Workflows → Create → Survey automation, or the survey's <strong>Share → More → Run a workflow</strong></p></td><td colspan="1" rowspan="1"><p>Follow-ups inside Gleap: email the respondent, open a ticket, notify a teammate, set a contact attribute, call an API, with conditions on the answers</p></td></tr><tr><td colspan="1" rowspan="1"><p><a target="_blank" rel="noopener noreferrer nofollow" class="linktype-link link" data-linktype="link" href="https://gleap-developer-docs.gleap.help/en/articles/703-survey-webhooks">Survey webhooks</a></p></td><td colspan="1" rowspan="1"><p>Settings → Apps → Webhooks</p></td><td colspan="1" rowspan="1"><p>Your own backend, data warehouse</p></td></tr><tr><td colspan="1" rowspan="1"><p>Integrations (Slack, Discord, Zapier, email, webhook integration)</p></td><td colspan="1" rowspan="1"><p>Settings → Apps, action "on new item" with the Survey type</p></td><td colspan="1" rowspan="1"><p>A notification per response in a channel</p></td></tr></tbody></table>

## Survey automations

A survey automation is a workflow with the trigger **On survey completed**. It runs once per response, when the respondent reaches an ending — in the app, on the survey page, from an email or an embed. A response left halfway does not start it.

### Trigger

-   **Survey**: any survey, or one survey.
    
-   **Only run when**: conditions on the answers of that survey and on the contact. Each question type offers matching operators:
    

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Question</p></th><th colspan="1" rowspan="1"><p>Operators</p></th></tr><tr><td colspan="1" rowspan="1"><p>NPS</p></td><td colspan="1" rowspan="1"><p>is a Detractor (0–6) / Passive (7–8) / Promoter (9–10), is, is below, is above, was skipped</p></td></tr><tr><td colspan="1" rowspan="1"><p>CSAT, rating, scale, number</p></td><td colspan="1" rowspan="1"><p>is, is below, is above, was skipped</p></td></tr><tr><td colspan="1" rowspan="1"><p>Single choice</p></td><td colspan="1" rowspan="1"><p>is, is not, was skipped</p></td></tr><tr><td colspan="1" rowspan="1"><p>Multiple choice</p></td><td colspan="1" rowspan="1"><p>includes, doesn't include, was skipped</p></td></tr><tr><td colspan="1" rowspan="1"><p>Yes / no</p></td><td colspan="1" rowspan="1"><p>is Yes / No, was skipped</p></td></tr><tr><td colspan="1" rowspan="1"><p>Text, email, date</p></td><td colspan="1" rowspan="1"><p>contains, doesn't contain, is, was answered, was skipped</p></td></tr><tr><td colspan="1" rowspan="1"><p>Upload</p></td><td colspan="1" rowspan="1"><p>was answered, was skipped</p></td></tr></tbody></table>

Contact conditions use your contact attributes (plan, company, custom data). The same conditions are available in **Condition** steps inside the workflow.

Every matching live survey automation runs — there is no priority between them.

### Steps

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Step</p></th><th colspan="1" rowspan="1"><p>What it does</p></th></tr><tr><td colspan="1" rowspan="1"><p>Custom API action</p></td><td colspan="1" rowspan="1"><p>Calls your URL with the response (see variables).</p></td></tr><tr><td colspan="1" rowspan="1"><p>Condition</p></td><td colspan="1" rowspan="1"><p>Branches on answers, contact attributes, office hours or API results.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Delay</p></td><td colspan="1" rowspan="1"><p>Waits, e.g. a day before a follow-up email.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Create ticket</p></td><td colspan="1" rowspan="1"><p>Opens a ticket for the respondent, linked to the response (the ticket shows the survey response card). The ticket's own workflows — for example Kai — run as for any new ticket.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Email contact</p></td><td colspan="1" rowspan="1"><p>Emails the respondent.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Notify teammate</p></td><td colspan="1" rowspan="1"><p>In-app notification linking to the response.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Set data attribute</p></td><td colspan="1" rowspan="1"><p>Writes a contact attribute, e.g. the latest NPS score.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Pass to workflow</p></td><td colspan="1" rowspan="1"><p>Continues in another survey automation.</p></td></tr></tbody></table>

Anonymous responses have no contact: steps that need one (ticket, email, contact attribute) are skipped and the reason shows in **Runs**.

### Variables

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Variable</p></th><th colspan="1" rowspan="1"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1"><p><code>{{survey.name}}</code>, <code>{{survey.id}}</code></p></td><td colspan="1" rowspan="1"><p>Survey name and SDK id</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>{{response.answers.&lt;key&gt;}}</code></p></td><td colspan="1" rowspan="1"><p>One answer as text (choice labels, Yes / No) — <code>&lt;key&gt;</code> is the question's answer key</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>{{response.nps}}</code>, <code>{{response.npsGroup}}</code></p></td><td colspan="1" rowspan="1"><p>NPS score and <code>detractor</code> / <code>passive</code> / <code>promoter</code></p></td></tr><tr><td colspan="1" rowspan="1"><p><code>{{response.text}}</code></p></td><td colspan="1" rowspan="1"><p>All answers as "Question: answer" lines</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>{{response.link}}</code></p></td><td colspan="1" rowspan="1"><p>The response in the dashboard</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>{{response.id}}</code>, <code>{{response.channel}}</code>, <code>{{response.language}}</code>, <code>{{response.fields.&lt;key&gt;}}</code>, <code>{{response.durationSeconds}}</code></p></td><td colspan="1" rowspan="1"><p>Response details and hidden fields</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>{{contact.name}}</code>, <code>{{contact.email}}</code>, <code>{{contact.userId}}</code>, <code>{{contact.plan}}</code>, <code>{{contact.customData.&lt;key&gt;}}</code></p></td><td colspan="1" rowspan="1"><p>The respondent (<code>{{session.*}}</code> works too)</p></td></tr></tbody></table>

### Limits

-   Runs start from a queue a few seconds after completion, never in the respondent's request.
    
-   Up to 600 responses per project and minute start automations; more wait and start a minute later.
    
-   Up to 10 survey automations run per response.
    

## Automations that used survey tickets

Before Surveys 2.0 every response created a ticket of type Survey. Here is what happens to each kind of automation that reacted to those tickets:

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Before</p></th><th colspan="1" rowspan="1"><p>Now</p></th></tr><tr><td colspan="1" rowspan="1"><p>Webhook on <code>ticket.created</code> filtered to the Survey type, or without a type filter</p></td><td colspan="1" rowspan="1"><p>Keeps receiving a ticket-shaped <code>ticket.created</code> payload for every completed response until <strong>January 5, 2027</strong>: <code>formData</code> keyed by the old question names (migrated surveys) or answer keys, choices as their label text, <code>session</code> with the same contact fields as before, plus <code>surveyResponse</code> (the response id). Move to <code>survey.response.completed</code> before then.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Slack, Discord, email and webhook integrations with the Survey type on "new item"</p></td><td colspan="1" rowspan="1"><p>Keep posting one message per completed response, with the answers and a link to the response.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Zapier with the Survey type</p></td><td colspan="1" rowspan="1"><p>Keeps receiving one call per completed response: the new <code>{ event, data }</code> payload, with the old ticket fields at the top level until January 5, 2027.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Jira, Linear, Asana, ClickUp, GitHub, Trello and the other integrations with the Survey type</p></td><td colspan="1" rowspan="1"><p>Keep creating one issue per completed response until <strong>January 5, 2027</strong>, with the same integration settings (type filter, on/off, board, issue type). The issue is titled "Survey response: &lt;survey name&gt;" and lists the answers (choice labels, keyed like before), the contact and a link to the response; the response shows a link to the issue. After that date, use a survey automation with a Custom API action, or Zapier.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Workflows on "On ticket created" with the Survey type</p></td><td colspan="1" rowspan="1"><p>Never ran for survey tickets. Use a survey automation.</p></td></tr><tr><td colspan="1" rowspan="1"><p>REST pollers on <code>GET /v3/engagement/surveys/{id}/responses</code></p></td><td colspan="1" rowspan="1"><p>Keep working with the old response shape. Pollers that read survey tickets from the ticket endpoints see no new responses — use the survey responses endpoint.</p></td></tr></tbody></table>

## Related

- [Surveys](https://docs.gleap.ai/en/articles/699-surveys.md)
- [Survey definition](https://docs.gleap.ai/en/articles/700-survey-definition.md)
- [Survey analytics](https://docs.gleap.ai/en/articles/701-survey-analytics.md)
- [Surveys REST API](https://docs.gleap.ai/en/articles/702-surveys-rest-api.md)
- [Survey webhooks](https://docs.gleap.ai/en/articles/703-survey-webhooks.md)
