Skip to main content

How to Import and Use Custom Variables?

Import custom variables using a CSV file, API, or Clay, and use them in a HeyReach campaign.

Here's a step-by-step guide on how.


Option 1: Importing and mapping custom variables from a CSV File

Here's a detailed video that can guide you through this process.

Step 1: Open the Leads panel on HeyReach

  • Navigate to the Leads panel in HeyReach.

  • Click on the Add Leads button.


Step 2: Import the CSV file

  • Choose the Import from CSV method and click Continue.

Step 3: Upload your CSV file.

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

Step 3: Add custom variables

Click 'Add custom variable', and two new fields will appear:

  1. 'Map from'. This determines from which CSV column the custom variable will be populated (left field).

  2. The name of the custom variable in your HeyReach lead list (right field)

💡 If the CSV column was previously mapped to a default variable, it cannot be used again. Unselect it first and set it to 'None' by clicking the variable's dropdown menu.

🚨 It is best practice to name custom variables differently from default variables (e.g., 'custom_company' vs. 'company').

If both the default and custom variable are named 'Company' and you use it as a custom variable in a message, the default variable will be used, not the custom one.

🧑‍💻 If you've created a custom variable without entering its information, you cannot import the leads. Remove it by clicking the 'X' button next to it.

Once everything is set, select the lead list you want to add the leads to or create a new empty lead list. Once done, click "Import." If the import is successful, proceed to the next step.


​To use the custom variables, open the Campaigns panel and launch a new campaign. Select the list of leads (with custom variables) you imported previously.

In the sequence, you can use the personalization variables in the "Connection Request", "Send Message" or "Send InMail" steps.

The variables will be available under the 'Add variable' dropdown menu. HeyReach's default variables will be blue, while your custom variables will be orange.

🚨 You can preview the variables for each lead per message by clicking 'Preview'.

🧠 The custom variable will be replaced with the value specified for each lead for the custom variable. If the value is null, the fallback message will be used.


Option 2: Mapping custom variables from an API request

If you wish to take the API route, you can use two specific endpoints. The first is AddLeadstoCampaignV2, while the second is AddLeadstoListV2.

‼️ Leads without values for all three obligatory fields (firstName, lastName, and profileUrl) will silently fail.

The personalization variables can be added using the customUserFields array in the API requests.

🚨 The name field in the customUserFields array of the leads you are importing must contain only alpha-numeric characters or underscores _. An error will be returned if the name field does not follow this format.

The API requests will return the number of imported, updated, or failed leads.

🧑‍💻 This method allows you to update leads' custom variables in a lead list (e.g., lead X had company Y. You can update it to Z).

​To use the custom variables, open the Campaigns panel and launch a new campaign. Select the list of leads (with custom variables) you imported previously.

In the sequence, you can use the personalization variables in the "Connection Request", "Send Message" or "Send InMail" steps.

The variables will be available under the 'Add variable' dropdown menu. HeyReach's default variables will be blue, while your custom variables will be orange.

🚨 You can preview the variables for each lead per message by clicking 'Preview'.


Option 3: Mapping custom variables from Clay

Here's a detailed video that can guide you through this process.

First, integrate HeyReach with Clay. Once done, launch the campaign you wish to push the leads from Clay and pause it. Open the Clay table from which you wish to push the leads and select 'Add Lead to Campaign' and the campaign to which you wish to push the leads.

‼️ Leads without values for all three obligatory fields (firstName, lastName, and profileUrl) will silently fail.

🧑‍💻 This method has an optional parameter, 'LinkedIn account', that allows you to select the sender the lead will be assigned to. If left empty, leads will be randomly assigned to the senders available in the campaign.

Map your custom variables using the custom fields.

Once everything is configured, run the column in Clay, and the leads will be added to the selected HeyReach campaign.

Finally, open HeyReach and edit the campaign. Include the custom variables in the messaging, and launch it again. In the sequence, you can use the personalization variables in the "Connection Request", "Send Message" or "Send InMail" steps.

The variables will be available under the 'Add variable' dropdown menu. HeyReach's default variables will be blue, while your custom variables will be orange.

🚨 You can preview the variables for each lead per message by clicking 'Preview'.

Did this answer your question?