Skip to main content

Getting Started with Variables

Use variables to reuse values in your flow.

Updated over 3 weeks ago

Variables in Heyflow are a powerful way to capture, store, and reuse values throughout your flow - helping you create more dynamic, personalized experiences. Whether you're addressing users by name, pre-filling information, or adjusting logic based on inputs, variables make it easy.

The best part? It’s incredibly simple to set up and use!


Setup

Step 1: Setting the variable

  1. To add a variable to your input blocks, head to the edit section of your flow.

  2. Select an input block (like input field or picture choice) in the content panel.

  3. Now, it's highlighted, and you can see the settings of the block.

  4. At the bottom of the edit panel, you find a section labeled 'Labels & Variables'.

  5. In the field labeled 'Variable', type the name of your new variable. For example, you can use name, first_name or username.

  6. In some cases your input block offers different options to answer. In this case you can set up different variables for the different answer options.

  7. After confirming your entry with enter, your variable is now available in your flow for further use.

❗ For technical reasons, there are some limitations for the name of variables, e.g. a space between words is not allowed.

Step 2: Using the variable

  1. On any following screen, add a Text or Headline block.

  2. You can simply type the symbol @ and choose out of the drop-down menu full of your previously set variables. Alternatively, you can simply type in the name of the variable, e.g. @firstname.

  3. After selecting the variable, it will be highlighted in blue in the text block. If it's not highlighted in blue, that means that it will not be replaced in your flow.

  4. That's it! You can create and use more variables throughout your flow. Just make sure that the @variable is spelled exactly as you have defined it and that you use the @variable in a text block.

Limitations

While variables are powerful, there are a few limitations to keep in mind.

  • Variables cannot be displayed on the same screen where they are set - they can only be used on later screens in the flow.

  • Additionally, variables are text-based, so calculations may require extra settings.

  • Furthermore, some special characters, like colons or asterisks, cannot be used to name variables.

  • The same applies for some language-specific letters like ä, ö, ü.

  • Your variable cannot contain any blank spaces. These will be automatically replaced by underscores.

  • Lastly, make sure variable names are unique and consistent to avoid unexpected behavior.

🔎 Whenever you enter a character that is not supported, it will automatically be replaced by underscores.


Use Cases for Variables

Personalization in Flows

Variables make it easy to personalize your flow based on user input or URL parameters. For example, you can ask for a user’s name early in the flow and store it as a variable. Later, reuse that variable to greet them personally - like "Nice to meet you, @name!" - creating a more engaging and tailored experience.

This small touch can build trust, increase conversion rates, and make your flow feel more human. Personalization works with any input field, from names and company info to custom preferences.

Set variables from URL

To make your flow even more dynamic, you can pass information directly from the URL into your flow using variables. This allows you to personalize the experience with details like names, user IDs, traffic sources, and more - all without requiring manual input of your users. You can find out more details about that topic here.

Redirect to URL with variables

A lesser-known but powerful feature is URL redirection with parameters. It allows you to pass data collected in your flow, such as names or email addresses, to another website. This is especially useful when redirecting users to a personalized thank-you page or a booking calendar, so they don’t have to re-enter the same information. Learn more about that here.

Calculations

You can use variables to add simple calculations to your flow - perfect for lead scoring, price estimates, or tailoring your sales process. For example, assign points based on answers to calculate a lead score, or use prefilled inputs (like budget or team size) in formulas to deliver dynamic results. Just define your variables, set up the logic, and let Heyflow do the math. Click here to learn more about calculations.

URL/UTM parameters

One powerful use of variables is capturing UTM parameters from the URL to track where your leads are coming from. This is especially useful for analyzing campaign performance and understanding which channels drive the most conversions.

To set this up, add input fields in your flow for each UTM parameter you want to capture. Then, set the variable name to match the parameter exactly. When a visitor lands on your Heyflow with tagged URLs (e.g. ?utm_source=instagram), the value is automatically saved to the corresponding variable. No user input required.

You can then reuse these variables throughout your flow, send them to your CRM, or include them in your redirection URL for full-funnel tracking. If you want to find out more about that, read this article.

Did this answer your question?