This template is used to verify a referral code and assign points for invited friends. By default, it’s designed for gamification scenarios.
Learn more about how to issue a referral code.
How to add the template
Open the Automations section.
Go to Ready-made templates.
Select Referral code.
Choose the account where the referral system will be set up.
Click Add template.
How the template works
A new user receives a referral code and a trigger word from their friend. They send the trigger word to your account (or Telegram bot), then enter the referral code when prompted.
After the code is validated, they become a referral, and both players receive points.
Condition: Assigned tags
The system checks if the user already has the tag “Entered the promocode.”
If the tag exists, the user sees the message: “This promo code has already been activated — you can’t earn points twice.”
If the tag does not exist, the main flow starts and greets the new user.
Welcome message
If the tag isn’t present, the bot sends: “Hi! I see you came from a friend. Please enter the code they gave you.”
This message prompts the user to submit their referral code for verification.
Collecting data
Once the user enters a message with the code, the system validates it using the Collect client data action with the data type Referral Code.
The “If response is incorrect” option is enabled to prevent users from entering random text. If the input is invalid, the bot replies: “That code doesn’t exist, please try again.”
Important: A user cannot activate their own referral code. If they try, the bot will detect this and send an error message.
Logging the Referral and tagging
After successful code activation, the user becomes a referral.
The system adds the tag “Entered promo code”, preventing them from repeating the process and receiving points again.
This tag is checked in the start block to separate new users from existing ones.
Code activation confirmation
After tagging, the bot sends a message confirming success, for example: “Great! Points are being added to your account 🔥”
Awarding points
Next, the Gamification Points action is triggered:
The referral (new user) receives 100 points.
The referrer (inviter) receives 50 points.
These values can be adjusted — you can change the point amounts or disable one of the awards.
Invitation to the game
After points are awarded, send a message encouraging the user to join your main game or campaign. You can explain the prizes, rules, and participation timeline.
Include a button “Rules” — link it to your leaderboard or event page.
Setting the trigger
After editing the automation, set up a trigger word to start it. Open the trigger menu in the top-right corner of the builder.
Choose short, simple trigger words such as “Friend”, “I know the code”, etc.
Optional improvements:
1. Follower verification
If points should only be awarded to subscribed users, you can add a subscription check before the code verification step.
Steps to update your automation:
In the welcome message, prompt users to click a button.
Add a button that links to the subscription check.
Create a Condition: Subscription.
Connect the button to the subscription check.
Add a message for unsubscribed users with a retry button.
Loop the button and check until the subscription is confirmed.
Once verified, check for the “Entered promo code” tag again:
This is necessary so that the user, after activating the code, cannot go back, click the button again to check the subscription and re-enter the code to get points.
If the tag exists → send “Promo code already activated.”
If not → send “Great! Enter your code below.”
All ready! This ensures users can’t reactivate their code after completing the flow.
2. Redirecting to the game after points
Instead of just showing a leaderboard link, you can immediately move the referral into your main game automation.
In the message, invite them to continue and add the Run automation action connected to your main game.
This way, the referral instantly enters the game — no need for any extra commands.
3. Notifying the Referrer
You can also notify the referrer about their friend’s activation and track how many referrals they’ve brought in.
To do this:
Add and configure the 3/3 [Referral System] Prize template.
In the Action block (where points are awarded), add Launch automation.
Select the automation “Prize.”
Enable the option “Launch for referrer.”
The referrer will receive a message notifying them that their friend activated the code, along with the updated point total.
A custom variable can be used to count all referrals — useful for your game setup.
Note: If the referrer hasn’t been active in your DMs for over 24 hours and the chat session is closed, they won’t receive the message, but the referral counter will still update.
Related articles:

















