---
title: "Activepieces"
description: "A step-by-step guide to integrating Formbricks with Activepieces."
icon: "puzzle-piece"
---

Activepieces is a versatile tool to automate workflows between Formbricks and numerous applications. Here's how to set it up.

<Note>
  Ensure your survey is finalized before setting up Activepieces. Any changes in the survey will require additional adjustments in the workflow.
</Note>

## Step 1: Check your question codes

Every question has a **question code**, such as `q1` or `nps`, and the `dataByQuestionCode` group of the trigger output shows your answers under these codes. You can read and change the code in the **Settings** tab of a question, under **Recode**, **before** you activate the survey. Once the survey is active, codes are locked, so the flow you build on them keeps working.

<Note>
  Question codes start with a lowercase letter and use lowercase letters, digits and `_`. Pick short, readable names such as `nps` or `visit_reason`. Learn more in [Question codes and answer codes](/surveys/analysis/question-codes).
</Note>

<Note>
  The Question ID of a question is generated and cannot be changed. If you need it, choose **Copy question ID** in the question's **⋯** menu.
</Note>

## Step 2: Setup Activepieces

Visit [Activepieces](https://activepieces.com) to start a new Flow.

![Create New Flow](/images/platform/features/integrations/activepieces/create-new-flow.webp)

Search for `Formbricks` and choose the event to trigger the flow, we will choose `Response Finished` here

![Search Formbricks](/images/platform/features/integrations/activepieces/search-formbricks.webp)

## Step 3: Connect Formbricks with Activepieces

Click on `Create connection`:

![Create Connection](/images/platform/features/integrations/activepieces/create-connection.webp)

Enter the Formbricks API Host and API Key. API Host is by default set to https://app.formbricks.com but can be modified for self-hosting instances. Learn how to get an API Key from the [API Key tutorial](/api-reference/generate-key).


Use a key scoped to **exactly one workspace** with **manage** access. Activepieces validates it through
`/api/v1/management/me`; multi-workspace keys fail that check. Manage access lets the trigger delete its
webhook when the flow is disabled, as well as create it.

![Configure Connection](/images/platform/features/integrations/activepieces/configure-connection.webp)

## Step 4: Select Survey

Choose from your created surveys:

![Select Survey](/images/platform/features/integrations/activepieces/select-survey.webp)

## Step 5: Send a test response

You need a test response for Activepieces setup. Click on Test trigger and submit a test response in the connected Formbricks survey to see the data in Activepieces.

![Test Trigger](/images/platform/features/integrations/activepieces/test-trigger.webp)

If the test response is successful, you will see the data in Activepieces.

![Success Response](/images/platform/features/integrations/activepieces/success-response.webp)

## Step 6: Set up Google Sheet

Decide on the desired action for the data. Here, we'll send submissions to a Google Sheet. Add Google sheet step to your flow and configure it as follows:
Choose "Add a Row" for the action. Authenticate with Google and select the spreadsheet you want to add the data to.

![Select Google sheet](/images/platform/features/integrations/activepieces/select-gs-sheet.webp)

Specify the fields you want to add to the spreadsheet.

![Match Data](/images/platform/features/integrations/activepieces/match-data.webp)

A new row gets added to the spreadsheet for every response:

![Result](/images/platform/features/integrations/activepieces/result.webp)

## Self-hosted Formbricks

Use your instance's public HTTPS URL instead of `https://app.formbricks.com` when creating the
connection. Create a [scoped API key](/api-reference/generate-key) on that same instance.
No Formbricks server environment variable is needed for this API-key connection.

Make sure the automation service can reach your instance, then submit a test survey response and
verify the expected workflow runs. Check host, key scopes and network access if it fails.

![ActivePieces connection with a custom instance URL](/images/self-hosting/configuration/integrations/activepieces/new-connection.webp)
