# Setting Variables in Voiceflow Through Social Buttons

FlowBridge supports a powerful feature that lets you set Voiceflow variables directly through **button interactions**—even when the button is generated outside of Voiceflow (e.g., Make.com, n8n, your own backend, or any channel that supports interactive buttons).

This allows external systems to influence the active Voiceflow session by injecting variable values through a simple button-click.

***

### Overview

Any channel that FlowBridge supports can dynamically set Voiceflow variables using the following button ID format: `set-var:{variable_name}:{variable_value}`

When a user clicks a button with this ID pattern, FlowBridge will:

1. Detect the `set-var:` prefix
2. Extract `{variable_name}` and `{variable_value}`
3. Automatically update the Voiceflow session variable
4. Forward a synthetic message into your flow so you can react or continue the conversation

This enables external automations (e.g., Make.com scenarios, n8n workflows, custom backends) to “push” state into Voiceflow by triggering a button.

***

### Basic Example

If a button has this ID: `set-var:user_preference:premium`&#x20;

FlowBridge will set:

* **Variable:** `user_preference`
* **Value:** `premium`

#### Voiceflow Requirement

The variable must already exist in your Voiceflow project (case-sensitive).\
If the variable exists, FlowBridge updates it instantly.

***

### What FlowBridge Sends to Voiceflow

After updating the variable, FlowBridge injects a message into your flow so your design can continue seamlessly.

The message text follows this format: `Button variable set set-var:{name}:{value}`

Example: `Button variable set set-var:user_preference:premium`

This message is received by your Voiceflow flow like any other user message.

#### Why this matters

* Your flow can **capture and ignore** this message to move forward
* Or you can use this as a trigger to branch your logic
* Or simply let the conversation continue now that the variable is updated

***

### Use Cases

#### ✔ Button triggers generated outside Voiceflow

Some users generate their buttons through:

* Make.com
* n8n
* Custom backends
* CRM systems
* Webhooks
* External API triggers

Using this feature, these platforms can send a button → FlowBridge → Voiceflow → **variable instantly updated**.

#### ✔ Conditional flows based on user choices

Example: selecting a subscription tier, language, product, or onboarding step.

#### ✔ Post-purchase confirmation buttons

External system confirms a payment → sends a button with set-var payment\_status:success → Voiceflow reacts accordingly.

#### ✔ Multi-step journeys managed outside Voiceflow

Create a wizard or onboarding flow in Make.com, then push states back into Voiceflow using button variable setting.

***

### Full Format Reference

`set-var:{variable_name}:{variable_value}`

| Part               | Description                                                               |
| ------------------ | ------------------------------------------------------------------------- |
| `set-var`          | Required prefix that FlowBridge uses to identify variable-setting buttons |
| `{variable_name}`  | Name of the Voiceflow variable to update                                  |
| `{variable_value}` | Value to assign to that variable                                          |

#### Notes

* Values are passed as strings.
* Use underscores/dashes if your variable naming requires it.
* Variable must exist inside your Voiceflow project.

***

### Example Buttons

#### Setting a tier

`set-var:tier:gold`

#### Setting language preference

`set-var:lang:ro`

#### Marking a booking as confirmed

`set-var:booking_status:confirmed`

#### Trigger from n8n or Make.com

Set the button ID field to: `set-var:flow_step:3`

***

### Platform Support

This feature works on **all FlowBridge channels**, including:

* WhatsApp
* Instagram
* Facebook Messenger
* Telegram
* Slack

If the channel supports interactive buttons, FlowBridge can process them.

***

### Why This Feature Exists

Many users needed a way to:

* Trigger Voiceflow behaviour based on external events &#x20;
* Update variables from Make.com or n8n &#x20;
* Build hybrid workflows where automation platforms drive the logic &#x20;
* Avoid HTTP-request-based custom functions for simple state updates &#x20;

With \`set-var:\` buttons, external systems can easily push state into Voiceflow without writing custom code.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowbridge.app/documentation/advanced-use-cases/setting-variables-in-voiceflow-through-social-buttons.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
