Skip to main content
3/3 [Referral System] Prize

How to grant a bonus to the referral link owner for inviting friends

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 third 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.

Important note for Instagram users: Instagram has a 24-hour messaging window, meaning that if a client has not interacted with your Direct Messages for more than 24 hours, the bot will not be able to send them automated messages.

When using this template in Instagram, be aware that the message may not be delivered due to this restriction. However, all actions preceding the message will still be executed, meaning referrals will still be counted.


This automation template is designed to notify the referrer (the person who invited the user) when their invited friend has met all the conditions and officially becomes a referral.

This automation does not have a trigger and only runs when the referral completes the "Launch automation for referrer" action, which is configured in the "[Ref. Links] Referral" automation.

How to add the template

The template should already be added if you have started setting up the referral system. However, if you missed this step, add the templates now.

  1. Open the Automations section.

  2. Select the "[Ref. Links] Prize" 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] Link" and "[Ref. links] Referral." Only after adding all three templates can you proceed with setting up the referral system.


Referral counting

Initial block: Set variable.

This block tracks the number of referrals a user has invited.

It uses the {{ referralbonus }} variable, which was reset in the "[Ref. Links] Link" automation.

Here, we configure the parameter to increase the variable’s value by 1.

Each time a new referral completes their process, the variable increments by 1, allowing for an accurate count of successful invitations from the client.

This way, you can keep monitoring how many referrals a client has brought in and, based on that number, offer them a bonus or reward.

Checking the number of referrals

The next step checks how many referrals the user has invited. This is done through a condition that evaluates the value of the {{ referralbonus }} variable.

By default, the condition is set to "greater than or equal to 5", meaning the user will receive a bonus after successfully referring 5 people.

If you want to change the referral threshold for receiving a reward, simply adjust the value (e.g., "greater than or equal to 10" for 10 referrals).

Notification about a referred friend

If the condition is not met (the variable value does not reach the minimum threshold, for example, if fewer than 5 referrals have been made), we send a standard notification to the referrer in the form of a message like:

"+1 to your total collection 🔥. Total number of invited friends: {{ referralbonus }}".

This message informs the referrer about their current status, allowing them to see how many friends they have invited so far. You can customize the message text as needed.

Rewarding referrers for their invites

If the condition is met (for example, the number of referrals is 5 or more), we send a message saying:

​"Claim your prize!"


In this message, the client is invited to receive their rightful bonus or prize. You can provide a link, a promo code, a PDF file (Telegram only), or any other type of reward.


Different rewards based on referral count

The default version of this template grants a single prize once a client reaches a set number of referrals. However, if you want clients to receive different rewards based on how many friends they invite, you can set up multiple conditions for different thresholds.


Example of an improved reward system:

  1. Check for maximum prize (e.g., 10 friends):
    If the referrer has invited 10 or more friends, they receive the highest-value prize. Condition: "Variable value is more than or equal to 10."

  2. Check for medium prize (e.g., 7 friends):
    If the referrer has invited 7 friends, they receive a mid-tier prize. Condition: "Variable value is 7." In this case, for the 8th and 9th referrals, the client will simply receive a message with their updated referral count instead of a new prize.

  3. Check for minimum prize (e.g., 4 friends):
    If the referrer has invited 4 friends, they receive a basic prize. Condition: "Variable value is 4." Similarly, for the 5th and 6th referrals, they will only get an informational message.

  4. If none of the conditions are met (fewer than 4 friends):

    If the referrer has invited fewer than 4 friends, they receive a message showing their referral count, but no prize is awarded.

Important: Conditions are checked from top to bottom. This means if you have multiple conditions for different referral counts, the first condition should check for the highest number of referrals and grant the most valuable prize. The following conditions should then check for lower numbers and distribute smaller prizes accordingly.


This automation template allows you to create a flexible reward system for your referrers. You can track the number of referrals a client has made and reward them based on their achievements. By enhancing the system with multiple prize levels, you make it more engaging and motivating for users.

At this stage, the referral system setup is complete.

Did this answer your question?