n8n Integration
Introduction
n8n is a workflow automation platform that lets you connect different apps and services and automate processes between them.
You can connect Refiner and n8n in both directions:
- Refiner → n8n: Send survey responses and other Refiner data to an n8n workflow in real time.
- n8n → Refiner: Update user data in Refiner from any n8n workflow.
The integration uses Refiner’s Webhooks and REST API, together with n8n’s built-in Webhook and HTTP Request nodes.
Prerequisites
To set up the integration, you’ll need a Refiner account and an n8n account.
If you want to send user data from n8n to Refiner, you’ll also need your Refiner API key. You can find it in your Refiner dashboard under Integrations > n8n.
When updating existing users in Refiner, we recommend using the same unique User ID that you use when identifying users with our JavaScript or Mobile SDKs.
Send survey data to n8n
A popular use case is to trigger an n8n workflow whenever a new survey response is collected in Refiner.
For example, you could use n8n to:
- Add survey responses to a database or spreadsheet
- Update customer records in your CRM
- Send personalized emails based on survey responses
- Notify your team about specific responses
- Trigger any other workflow supported by n8n
Sending data from Refiner to n8n is done using our Webhooks integration.
Create a Webhook in n8n
Start by creating a new workflow in n8n and add a Webhook node as the first step.
- Add a Webhook node to your workflow.
- Set the HTTP Method to
POST. - Select the Test URL and copy the URL provided by n8n.
- Click Listen for test event so that n8n is ready to receive your first webhook.
You can find more details about configuring Webhooks in the n8n Webhook node documentation.
Create a Webhook in Refiner
Next, head over to your Refiner account:
- Navigate to Integrations > Webhooks.
- Click Create Webhook.
- Give your webhook a name, for example
n8n. - Paste the Test URL provided by n8n into the Destination URL field.
- Choose the trigger event you want to use.
- Save your webhook.
You can use the Send test option in Refiner to send sample data to n8n.
Once n8n receives the webhook, you’ll see the Refiner payload in your Webhook node and can use its data in the following steps of your workflow.
Refiner webhooks can include survey response data, information about the survey, user identifiers, user traits, account information, tags, and other metadata.
Activate your workflow
n8n provides separate Webhook URLs for testing and production.
Once your workflow is ready:
- Copy the Production URL from your n8n Webhook node.
- Replace the Test URL in your Refiner Webhook configuration with the Production URL.
- Activate your n8n workflow.
From this moment on, Refiner will automatically trigger your n8n workflow whenever the configured event occurs.
Update user data in Refiner
You can also send data in the opposite direction and update user profiles in Refiner from an n8n workflow.
This allows you to import user traits from any system connected to n8n and use this data in Refiner to create user segments, target surveys, or analyze survey responses.
To update a user, use an n8n HTTP Request node to call Refiner’s Identify User API.
Configure the HTTP Request node
Add an HTTP Request node to your n8n workflow and configure it with the following settings:
Method: POST
URL: https://api.refiner.io/v1/identify-user
Authorization header Authorization: Bearer YOUR_API_KEY
Replace YOUR_API_KEY with the API key from Integrations > REST API in your Refiner account.
Set the request body to JSON and provide the user identifier together with any user traits you want to update.
For example:
{
"id": "YOUR_USER_ID",
"plan": "pro",
"company_size": 25,
"customer_since_at": "2025-01-15"
}
Instead of using static values, you can map values from previous nodes in your n8n workflow into the request body.
You can find more information about configuring API requests in the n8n HTTP Request node documentation.
Identifying users
Each request needs to include either an id or an email to identify the user.
Whenever possible, we recommend using the same unique User ID that you use when identifying the user with the Refiner JavaScript or Mobile SDK.
If the user already exists in Refiner, the provided traits are added to or updated on their user profile. If the user doesn’t exist yet, Refiner automatically creates a new user profile.
You are free to send additional user traits alongside the user identifier. New traits are created automatically in Refiner and can then be used for user segmentation and survey targeting.
That’s it! With Webhooks and the Refiner API, you can use n8n to build custom two-way workflows between Refiner and virtually any system connected to your n8n account.