Skip to main content
All CollectionsLeads & Lists
How to import and use custom variables?
How to import and use custom variables?

Import custom variables through .csv, API or Clay, and use them in a HeyReach campaign

Nikola Velkovski avatar
Written by Nikola Velkovski
Updated over 3 months ago

Did you know that you can create custom variables and import them in HeyReach?

Here's a step-by-step guide on how you can do it:

Step 1: Importing and Mapping custom variables from a CSV File

  • Start by heading to the lead screen in your HeyReach account. Click on "Add Leads" and choose the "Import from CSV" option.

  • Upload your CSV file. Make sure all mandatory fields: LinkedIn profile URL, first name, and last name, are properly populated.

  • Next, choose the custom variable. Click on "Add Custom Variable," find the variable you want to use in your HeyReach campaign, create an empty list called "Variables," and confirm.

  • Once everything is set, click "Import." If the import is successful, proceed to the next step.

Step 2: Using Custom Variables in a HeyReach Campaign

  • Go to the "Campaigns" section and launch a new campaign. Select the list of leads (with custom variables) you imported previously.

  • Continue by choosing the LinkedIn senders you want to assign and proceed to build the sequence. In the sequence, you can use the personalization variables in the "Connection Request", "Send Message" or "Send InMail" steps. When you are writing the message, the custom personalization variables will be highlighted in light blue.

Alternatively: Mapping Custom Variables from an API Request

  • Check the HeyReach API documentation for the "Add Leads to Campaign (v2)" request. This allows you to push leads from third-party tools like HubSpot or Clay directly into a HeyReach campaign. It will add the leads to an active campaign and to the lead list assigned to that campaign.

  • Also, you can add leads to a list only, using the "Add Leads to List (v2)" method from the API. This will only add the leads to a list.

The personalization variables can be added in the 'customUserFields' field in the API.

Dynamic personalization variables

Keep in mind that these will be dynamic personalization variables, a.k.a. you'll have to first type their names in the connection request or message, exactly as you have set them in the 3rd party integration, and then run the API request. The format you should be using in HeyReach's connection requests and messages is: {personalizationVariableName}

To understand this better, let's check the comparison between a dynamic personalization variable and the pre-imported ones.

  • For example, this is how a custom variable that's not dynamic looks like in HeyReach (you can add it to a message just by clicking on it)

  • The dynamic personalization variable won't be shown here, i.e. you'll have to manually type it in the message.

Alternatively: How to use custom variables from Clay/API in the campaign

Using the custom variables imported dynamically (through the API or Clay) is different than using the variables that are imported through CSV.

The main difference is: the variables you import from Clay or the API are not shown as an option to insert in the connection request note or the message, as they are dynamic (i.e. they don't exist when you are creating the campaign; they are created in runtime, after the campaign is started, when you add the leads dynamically).

So how you can make this work?

  1. When you are creating the sequence in HeyReach, the variables don't exist (as the leads are dynamically imported on the go), so just type the variables you'll be using, in this format:

    {variable_name}

    Make sure you don't have any spaces or special characters besides "-" and "_" inside the parentheses.
    Examples of good variable names: {AI_Icebreaker_1}, {complimentToTheProfile}, {websiteSummary}.

  2. In Clay, add the custom variable field, and make sure you are creating it with the same name that you are using in HeyReach - letter by letter.

  3. Once everything is set, both in the HeyReach campaign and in Clay, the leads will start flowing from Clay to HeyReach. All custom variables from Clay will be replaced in HeyReach's messages or connection notes.

Did this answer your question?