Skip to main content
1/3 [Ref. Links] Link

How to set up a referral link for inviting friends to the bot

David P. avatar
Written by David P.
Updated over 2 weeks ago

This guide explains how to set up and use the referral system in chatbots. Below, we’ll walk through the first of three templates that will help you correctly configure your referral system.

Important note: This template works together with two other templates for the referral system. Before setting it up, make sure to add all 3 templates to your connected Instagram or Telegram bot account.

Once added, you can start customizing them to fit your needs.


These templates are universal and work seamlessly on both Instagram and Telegram without significant differences.

Special Note for Instagram Users: Instagram has a unique feature. Simply clicking a referral link won’t trigger automation unless there’s already been a conversation between you and the client.

For the referral link to work, the client must either send you any message in Direct Messages after clicking the link or have previously messaged you in Direct Messages before clicking the link.

If there is an existing conversation, simply clicking the link will be enough.


In this guide, we will review the first template of three: "[Ref. Links] Link." This template generates a unique referral link for each user and triggers automation for the referrer.

How to add the template

To add the template, follow these 5 simple steps:

  1. Open the Automations section.

  2. Select the "[Ref. Links] Link" template.

  3. Choose the account for which the referral system is being set up.

  4. Click the "Add template" button.


Afterward, similarly add the templates: "[Ref. links] Referrer" and "[Ref. links] Prize."  Only after adding all three templates can you proceed with setting up the referral system.


Welcome message

The template starts with a welcome message in which the client is invited to learn the contest rules. After that, the rules are described: "Invite friends, get prizes!" At this point, the client understands what they need to do.


However, before providing the client with their link, we can verify if they meet the criteria to participate in the promotion, for example, whether they are subscribed to our channel. To do this, we set up a hidden subscription check, which happens after the "Get link" button.

Subscription check

If the client is subscribed to your Instagram or Telegram channel (depending on the platform), they can proceed.

Note: If the referral system is set up for a Telegram bot, in each condition with a subscription check, you must choose your Telegram channel. To do this, you need to add the Telegram bot as an administrator of your channel.

How to make a bot an administrator of a channel


If the client is not subscribed, they will receive a message with an invitation to subscribe and a "Done" button, which will help them navigate to your profile or channel to subscribe. For convenience, this message will also include a link to your channel or profile.

Important! The template by default uses ChatPlace links, which you need to replace with your own.

- Click on the message with the hyperlink, click the appropriate icon in the text editing window, and paste your own link or simply remove the hyperlink text.

- Then, click on the "Channel" buttons, and in the button settings window that appears, replace the link in both buttons.

By default, the template is set so that if the client is not subscribed, the subscription check will be repeated twice, and even if they are not subscribed, they will be able to continue. This is done because even if the client is not subscribed, they can still invite their friends, who will need to subscribe in order to participate.

However, you can loop the subscription check so that it continues until the client subscribes. To do this, swipe a connection arrow so that the subscription check repeats in a loop.

In that case, you can leave only one subscription check condition, loop it as shown in the example below, and make the verification button reusable so that the client can go through the verification process repeatedly until they eventually subscribe.

Tag Check

After successfully checking the subscription, the tag check is performed. Using the "Assigned Tags" condition, we check if the client has the tag "referrer get link" to determine whether they have already received a referral link. If the tag is present, the previously generated link will be displayed to the client.

Important! If you have previously run a similar campaign, make sure to replace all tags with new ones so that clients participating in the new one can fully take part, and previously invited referrals are not considered.


Resetting the referrer counter and assigning the tag

If the client does not have the tag, we generate the referral link. But before doing so, we record that the client has received their link and set the referrer counter to 0, marking the start of their participation in your campaign.

This is done using the "Add tags" action, where the client is assigned the tag "referrer get link."

Additionally, using the "Set a variable" action, the variable {{ referralbonus }} is set to 0.

Referral link generation

The "Referral Link" action generates a unique referral link for the client. In this block, the variable {{ referral_link_CP }} is presettle, and it will be used in the messages to display links to clients.

You need to choose the automation "[Ref. Links] Referal" in this action so that the automation for the referral is triggered by the link.

Sending the link

After generating the link, send the client a message with their unique referral link, which they can share with friends to invite them to participate in the contest. The template is already configured for this, with the default variable {{ referral_link_CP }}. We don’t recommend changing it, but if you have changed the variable in the "Referral Link" action, be sure to choose the new variable in the message.

Final message

The final message will inform the client that they have received their link and can start sharing it with friends.


However, this does not mean the automation has to end here. You can extend the workflow by providing more details about your campaign or directing the client to your main automation using the "Start Automation" action.

But for setting up the referral system, everything necessary has been configured in this template. Now, it's time to edit the second and third templates.

Trigger setup

Once the entire referral system is set up, don’t forget to configure the trigger for this automation. This is the only one of the three referral system automations that should have a trigger. The "Referral" and "Reward" automations should not have a trigger.

The trigger is configured in the upper right corner of the automation builder:

Learn more about setting up the trigger launch.


Next, we will set up the automation for the referral.

Did this answer your question?