> ## Documentation Index
> Fetch the complete documentation index at: https://formbricks.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n

> Integrate Formbricks with n8n for a streamlined workflow experience.

<Note>
  The Formbricks n8n node is currently only available in the n8n self-hosted
  version as a community node. To install it go to "Settings" -> "Community
  Nodes" and install @formbricks/n8n-nodes-formbricks.
</Note>

n8n allows you to build flexible workflows focused on deep data integration. And with sharable templates and a user-friendly UI, the less technical people on your team can collaborate on them too. Unlike other tools, complexity is not a limitation. So you can build whatever you want — without stressing over budget. Hook up Formbricks with n8n and you can send your data to 350+ other apps. Here is how to do it.

## Step 1: Setup your survey incl. `questionId` for every question

<Note>
  Nailed down your survey? Any changes in the survey cause additional work in
  the n8n node. It makes sense to first settle on the survey you want to run and
  then get to setting up n8n.
</Note>

When setting up the node your life will be easier when you change the `questionId`s of your survey questions. You can only do so **before** you publish your survey.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/update-question-id.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=aef81ffe55406253128ffdc41d667b48" alt="Update Question ID" width="931" height="363" data-path="images/xm-and-surveys/core-features/integrations/n8n/update-question-id.webp" />

*In every question card in the Advanced Settings you find the Question ID field. Update it so that you'll recognize the response tied to this question.*

<Note>
  Already published? Duplicate survey You can only update the questionId
  when the survey was not yet published. Already published it? Just **duplicate
  it** to update the questionIds.

  <img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/duplicate-survey.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=5ecddbfae6f713e2a2be16df32cba17f" alt="Duplicate Survey" width="511" height="142" data-path="images/xm-and-surveys/core-features/integrations/n8n/duplicate-survey.webp" />
</Note>

## Step 2: Setup your n8n workflow

Go to [n8n.io](https://n8n.io) and create a new workflow. Search for “Formbricks” to get started:

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/add-formbricks-trigger.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=4b53fcf705f002cef1bb9279e959b24d" alt="Add Formbricks Trigger" width="1050" height="1044" data-path="images/xm-and-surveys/core-features/integrations/n8n/add-formbricks-trigger.webp" />

## Step 3: Connect Formbricks with n8n

Now, you have to connect n8n with Formbricks via an API Key:

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/create-new-credential-btn.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=2c1d1987d23ec0aaf34ff3d8fa7a9e2f" alt="Create new credential button" width="1230" height="766" data-path="images/xm-and-surveys/core-features/integrations/n8n/create-new-credential-btn.webp" />

Click on Create New Credentail button to add your host and API Key

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/add-api-key.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=16b7cde82ee343b9e4926b9342ac3f7c" alt="Add host and api key" width="1904" height="844" data-path="images/xm-and-surveys/core-features/integrations/n8n/add-api-key.webp" />

Now you need an API key. Please refer to the [API Key Setup](/api-reference/rest-api#how-to-generate-an-api-key) page to learn how to create one.

Once you copied it in the API Key field, hit Save button to test the connection and save the credentials.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/success-connection.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=ec4843cc189adb46318febd153804ee6" alt="Successful Connection" width="1142" height="606" data-path="images/xm-and-surveys/core-features/integrations/n8n/success-connection.webp" />

## Step 4: Select Event

Next, you can choose the event you want to trigger the node on. You can select multiple events:

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/select-event.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=de6ea8723209ba12b0494a23bac84e51" alt="Select Event" width="1438" height="994" data-path="images/xm-and-surveys/core-features/integrations/n8n/select-event.webp" />

Here, we are adding `Response Finished` as an event, which will trigger when the survey has been filled out.

## Step 5: Select Survey

Next, you can choose from all the surveys you have created in this environment. You can select multiple surveys:

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/select-survey.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=6923ea8fe567a54b5ebde5a65de42107" alt="Select Survey" width="1002" height="844" data-path="images/xm-and-surveys/core-features/integrations/n8n/select-survey.webp" />

Here, we are selecting two surveys.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/selected-surveys.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=e4f3c9392fddf89d99884f8fae5bd60e" alt="Selected Surveys" width="1370" height="964" data-path="images/xm-and-surveys/core-features/integrations/n8n/selected-surveys.webp" />

## Step 6: Test your trigger

In order to set up n8n you'll need a test response in the selected survey. This allows you to select the individual values of each response in your workflow.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/submit-test-response.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=47263ee0c7fe81fa97a71ffabb43bc80" alt="Submit Test Response" width="1130" height="682" data-path="images/xm-and-surveys/core-features/integrations/n8n/submit-test-response.webp" />

Next, click on Listen for event button.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/listen-for-event.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=9790a277b145f4196dc42abb7ba28cc1" alt="Listen for event" width="1108" height="692" data-path="images/xm-and-surveys/core-features/integrations/n8n/listen-for-event.webp" />

Then, go to the survey which you selected. Fill it out, and wait for the particular event to trigger (in this case it's `Response Finished`). Once the event is triggered you will see the response that you filled out in the survey.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/test-response-success.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=03bb422c493d1407ce31d28c3ecf964b" alt="Test Response Success" width="1830" height="1932" data-path="images/xm-and-surveys/core-features/integrations/n8n/test-response-success.webp" />

Now you have all the data you need at hand. The next steps depend on what you want to do with it. In this tutorial, we will send submissions to a discord channel:

## Step 7: Add discord to your workflow

Click on the plus and search `Discord`.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/add-discord.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=567248b904c37a726da571cc94c6bc24" alt="Add Discord" width="1854" height="1164" data-path="images/xm-and-surveys/core-features/integrations/n8n/add-discord.webp" />

Fill in the `Webhook URL` and the `Content` that you want to receive in the respective discord channel. Next, click on `Execute Node` button to test the node.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/fill-discord-details.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=b2051a9482cfd9138b65d2642b78a98f" alt="Fill Discord Details" width="2238" height="1720" data-path="images/xm-and-surveys/core-features/integrations/n8n/fill-discord-details.webp" />

Once the execution is successful, you'll receive the content in the discord channel.

<img src="https://mintcdn.com/formbricks/hX4eoMhsUTcFz4G1/images/xm-and-surveys/core-features/integrations/n8n/discord-response.webp?fit=max&auto=format&n=hX4eoMhsUTcFz4G1&q=85&s=5b8eae673b13f2387d2e3a125b004d1c" alt="Discord Response" width="1284" height="362" data-path="images/xm-and-surveys/core-features/integrations/n8n/discord-response.webp" />
