Skip to main content

Retention – Save customers before you lose them: act on every unhappy response by e-mail or in HubSpot

The moment a customer leaves a low rating in your Survio survey, get an e-mail with the whole response, or a call task on their HubSpot contact, so you can reach out before they leave. Guide with n8n and ready-made workflows.

Written by Success Team Survio

Which case is for you?

Case A – simple, for everyone: get every unhappy survey answer straight to your e-mail.

Case B – for teams using a CRM: every unhappy customer gets an automatic call task in HubSpot, so your team reaches out the same day.

When a customer is unhappy, the first hours decide whether they stay. With this setup, every low rating in your survey reaches you within seconds, with the whole response and the customer's contact, so you can call or write back while it still matters.
​

This is the e-mail you get for every unhappy response in Case A:
​

Unhappy customer e-mail in Gmail with the whole response


​

And this is the call task your team gets in HubSpot in Case B:
​

Call unhappy customer task on a HubSpot contact with the whole response

How this works. Survio sends each completed response to a webhook URL. An automation tool (we use n8n in this guide) receives it, checks whether the customer is unhappy and, if so, e-mails you or creates a task in HubSpot. Happy responses are ignored.

New to webhooks in Survio? Start with Webhooks: send responses to your other tools in real time, then come back here.
​

What you'll build

In both cases, an unhappy response means a rating of 1 or 2 out of 5, or the answer Rather dissatisfied or Dissatisfied.

At a glance

Case A: an e-mail to you

Case B: a task in HubSpot

Result

The whole response in your inbox

A call task due today on the customer's contact in HubSpot, with the whole response

Tools

Survio, n8n, Gmail

Survio, n8n, HubSpot

Best for

An owner who handles unhappy customers personally

A team that tracks customers in a CRM

Before you start

  • A Survio survey on a paid plan. Webhooks aren't available on the Free plan, and each plan allows a set number of webhooks per survey (see the webhooks article).

  • An n8n account, n8n Cloud or self-hosted.

  • Case A: a Gmail account for the alert. Case B: a HubSpot account.

In this guide we use a short customer satisfaction survey: a star rating, an "Overall, how satisfied are you?" choice question, a "How did you shop with us this time?" choice question, an open comment and an optional e-mail question.
​

Step 1 — Make sure you'll know who answered

Knowing who answered lets you reach out to the customer, but it's optional. Without it, Case A still sends you every unhappy response, so you see what went wrong; you just won't know who wrote it. Case B needs the customer's e-mail, because HubSpot adds the task to their contact.

Survio responses are anonymous unless you collect a contact. Use one or more of these:

  • An optional e-mail question at the end of the survey, for example "Leave your e-mail if you'd like us to get back to you." Use the E-mail answer question type.

  • URL parameters with your own customer details. Go to Get responses → URL parameters, create parameters such as email and order-id, and add their values to the link you send each customer, for example in your order confirmation e-mail. Parameter names can't contain underscores. See URL parameters.

  • Survio e-mail invitations. Send the survey to your customers through Survio's own e-mail invitations, and every response arrives with the e-mail address you sent it to. See E-mail invitations.

E-mail answer question in the Survio survey editor
URL parameters email and order-id in Survio
Survey link with the email and order-id parameters


​

Step 2 — Create the webhook in n8n

  1. In n8n, create a new workflow and add a Webhook node as the trigger.

  2. Set HTTP Method to POST.

  3. Switch to the Production URL tab and copy the address.

  4. Click Publish. The production URL only accepts deliveries once the workflow is published.

n8n Webhook node with HTTP Method POST and the Production URL tab
Published button in the n8n editor

Use the Production URL, not the Test URL. The Test URL only listens while the editor is waiting for a test event, so Survio's deliveries fail as soon as you close it. Survio retries a failed delivery for about a day, and after 5 days of failures it switches the webhook off.

Step 3 — Connect the survey in Survio

  1. Open your survey and go to Get responses.

  2. In the left sidebar under Automations & Integrations, select Webhooks and click + Add a webhook.

  3. Paste the n8n Production URL into Webhook URL and click Save webhook. The webhook is switched on straight away.

Add a webhook dialog in Survio with the n8n Production URL filled in
Saved webhook in Survio, switched on


​

Step 4 — Send a test response and find your question ids

  1. Open your survey through its normal link and submit one complete response with a low rating. Survio sends only completed responses, so click through to the end.

  2. In n8n, open the Executions tab. The delivery arrives within a few seconds.

  3. Open the execution and click the Webhook node. Expand body, then data, then answers. Each answer shows its question.id, the question label and the answer.

  4. Write down the ids of the rating question, the satisfaction question and the e-mail question. You can also click Pin to keep building against this response.

Executions tab in n8n with successful runs
Webhook node output in n8n: body, data, answers

Where the customer's e-mail comes from. data.email is filled only when you send the survey through Survio e-mail invitations. An e-mail from the e-mail question arrives in its answer, and one from a URL parameter in data.parameters. The ready-made workflows check all three.

Case A — Get an e-mail for every unhappy response

Two steps follow the webhook: Unhappy? lets only unhappy responses through, and Forward the response e-mails them to you.

Unhappy?

  1. Add an If node after the Webhook node and rename it to Unhappy?.

  2. Add three conditions and combine them with OR, so that any one of them is enough:

Value

Condition

Compare with

{{ $json.body.data.answers.find(a => a.question.id === 90403153)?.answer ?? 99 }}

Number: is less than or equal to

2

{{ $json.body.data.answers.find(a => a.question.id === 90403151)?.answer?.labels?.[0] ?? "" }}

String: is equal to

Rather dissatisfied

{{ $json.body.data.answers.find(a => a.question.id === 90403151)?.answer?.labels?.[0] ?? "" }}

String: is equal to

Dissatisfied

Replace 90403153 (the rating) and 90403151 (the satisfaction question) with your own ids. The ?? 99 part makes a response without a rating count as happy.

If node Unhappy? with three conditions combined with OR

Answer texts must match exactly. Type the options exactly as they appear in your survey. If your survey has several language versions, the answer arrives in the language the respondent used, so check a test response from each version and add those texts too.

Forward the response

  1. Add a Gmail node to the true output of Unhappy?, rename it to Forward the response, and choose Message and Send.

  2. Connect your Gmail account and put your own address in To.

  3. Set Subject to Unhappy customer: {{ $json.body.data.answers.find(a => a.question.id === 90403153)?.answer ?? "?" }}/5.

  4. Set Email Type to HTML. In Message, list the whole response. The ready-made workflow below has a message that lists every question with its answer, plus the time, the order and the contact.

  5. Under Options, turn off Append n8n Attribution.

Gmail node Forward the response with To, Subject and Message

Leave the false output empty: happy responses simply end there. Click Publish again; changes you make after publishing go live only when you publish again.

n8n workflow: Survio Webhook, Unhappy?, Forward the response


​

Case B — Create a call task in HubSpot

Here the unhappy response becomes a task to call the customer today, on their contact in HubSpot, with the whole response in the task. HubSpot needs the customer's e-mail to find the contact, so this case works best with Survio e-mail invitations or the email URL parameter from Step 1.
​

Start with the same Unhappy? node as in Case A, then add three steps to its true output.
​

Prepare task

Add an Edit Fields (Set) node named Prepare task with these String fields. Replace the question ids with your own and Europe/Prague with your time zone.

Field name

Value

E-mail

{{ $json.body.data.email || $json.body.data.parameters?.email || $json.body.data.answers.find(a => a.question.id === 90403187)?.answer || "" }}

Subject

Call unhappy customer: {{ $json.body.data.answers.find(a => a.question.id === 90403153)?.answer }}/5, order {{ $json.body.data.parameters?.['order-id'] }}

Body

The rating, satisfaction, channel, comment, order and time, separated by <br> so that each one is on its own line in HubSpot (see the ready-made workflow)

Find or create contact

Add a HubSpot node named Find or create contact, choose the resource Contact and the operation Create or Update, connect your HubSpot account and set Email to {{ $json['E-mail'] }}. An existing customer is found by the e-mail; a new one is created.
​

Create call task

  1. Add another HubSpot node named Create call task and choose the resource Engagement, the operation Create and the type Task.

  2. Set the Due Date to {{ $now.endOf('day').toISO() }}, so the task is due today.

  3. Fill in Body with {{ $('Prepare task').item.json.Body }}, For Object Type with Contact, Status with Not Started and Subject with {{ $('Prepare task').item.json.Subject }}.

  4. Under Engagement Properties → Associations, set Contact IDs to {{ $json.vid }}. Optionally, enter the Owner ID of the person who should call; without it, the task has no owner and you assign it in HubSpot.

HubSpot node Create call task: type Task, due date, subject, body and associations

Click Publish again.

n8n workflow: Survio Webhook, Unhappy?, Prepare task, Find or create contact, Create call task

The contact may be linked to a company automatically. If HubSpot finds a company with the same e-mail domain, it associates the contact with it, and the contact can take over that company's owner. The task itself goes to the Owner ID you entered, if any.

Get the ready-made workflow

Instead of building Step 2 and your case by hand, start from our workflow. Download the file for your case from the attachments at the end of this article: survio-unhappy-responses-to-gmail.json for Case A, or survio-unhappy-responses-to-hubspot-tasks.json for Case B. Then:

  1. In n8n, create an empty workflow. Open the menu (three dots) next to the workflow name and choose Import, then From file. Pick the file you downloaded.

  2. Open Unhappy? and replace the question ids with your own.

  3. Case A: open Forward the response, connect your Gmail account, put your own address in To, and replace the question ids and Europe/Prague in the message.

  4. Case B: open Prepare task and replace the question ids and Europe/Prague. Then connect your HubSpot account in Find or create contact and Create call task, and in Create call task optionally enter the Owner ID of the person who should call.

  5. Open Survio Webhook, copy the Production URL into Survio (Step 3) and click Publish.

n8n workflow menu with Import and From file


​

Test it end to end

  1. Submit a response with a rating of 2. In Case A, the e-mail arrives within seconds; in Case B, the call task appears on the contact in HubSpot.

  2. Submit a response with a rating of 5 and Very satisfied. Nothing happens.

  3. Look at the Executions tab in n8n. Both deliveries are listed; the happy one stops at Unhappy?.

Troubleshooting

Symptom

Cause

Fix

Nothing arrives in n8n

The Test URL is in Survio, or the workflow isn't published

Copy the Production URL into Survio and click Publish

Survio won't save the webhook URL from a self-hosted n8n

n8n shows an internal address instead of its public one

Set n8n's WEBHOOK_URL setting to your public https address and copy the URL again

"Listen for test event" shows nothing although the survey was submitted

Survio sends to the Production URL; listening watches the Test URL

Check the Executions tab instead

Your latest change has no effect

The workflow is published, but the change isn't (the Publish button shows a dot)

Click Publish again

Every response sends an e-mail

The Gmail node is on the false output, or the conditions are combined with AND

Connect Gmail to the true output and combine the conditions with OR

A low rating doesn't send an e-mail

Wrong question id, or the answer text differs from the condition

Check the ids and texts against a test response in Executions

The contact in the e-mail says "not given"

The survey wasn't sent through Survio e-mail invitations, the link had no email parameter, and the customer skipped the e-mail question

Send the survey through Survio e-mail invitations, add URL parameters to your links, or make the e-mail question visible

Find or create contact fails in Case B

The response has no e-mail, so HubSpot can't find or create the contact

Send the survey through Survio e-mail invitations or through links with the email parameter

The task in HubSpot shows the whole response on one line

The Body uses plain line breaks

Separate the lines with <br>

Survio switched the webhook off

The webhook URL failed for 5 days in a row

Fix the cause, then switch the webhook back on in Survio

Good to know

  • Survio sends only completed responses, one message per response, within seconds. A survey someone leaves halfway isn't sent.

  • Nothing is sent retroactively: not responses from before the webhook existed, and not responses from while it was paused.

  • A failed delivery is retried up to 8 times over roughly 27 hours, and each attempt waits up to 30 seconds for a reply.

  • If deliveries fail for 5 days in a row, Survio switches the webhook off and you need to switch it back on.

  • Pausing a webhook keeps its slot; deleting it is permanent.

  • Survio doesn't keep a delivery history in the app. The Executions tab in n8n is your log.

  • Sending responses to webhooks doesn't use up any extra responses from your plan.

Rather have us set it up? On the Webhooks page in Survio, click Get expert setup, tell us what you'd like to happen, and our team will build it, test it and hand you a working webhook.

Did this answer your question?