This guide is suitable for both offline and online raffles.

How the bot works:

  • When the bot is launched, the participant receives their unique raffle number.

  • The bot records the participant in a shared table and provides information about the date, time, and location of the raffle.

  • The participant receives a reminder 10 minutes before the raffle.

  • The bot’s work ends, and the raffle is conducted using a random number generator.

Preparing the table

Participant numbers will be recorded in Google Sheets. You need to create this table beforehand.

We recommend 3 columns:

  • Participant Number

  • Name

  • Username


Creating a numeric field

Next, create a field where the subscriber’s unique number will be recorded.

  1. In the BotHelp dashboard, go to Settings → Custom Fields, and click Add New Field.

  2. Name the field. In this template, the field is called “contest”, so we recommend using the same name.

  3. Select Field Type → Number.

  4. Save the field.

Creating a numeric global variable

  1. In Settings → Global Variables, click Add New Variable.

  2. Name the variable (e.g., number).

  3. Select Type → Number.

  4. Choose the starting value (for example, 0 if the first participant should get number 1).

  5. Click Add to save.


Connecting the table

Follow our article on Google Sheets integration to connect the previously created table.

If the connection is successful, you will see the connected Google account and status Connected under Google Sheets Integrations.


Copying the template

  1. Go to the template “Raffle Number Assignment”: https://main.bothelp.io/f/93920e65df2

  2. Click Copy to BotHelp in the bottom right corner.

  3. Enter your BotHelp account domain (found in your browser address bar).

  4. Click Save Bot, give it a name, select the desired channel, and click Create Bot.

Important: If your Telegram channel is not yet connected to BotHelp, follow the provided instructions.

  1. The bot flow will load within a few seconds. Click OK.

  2. We recommend activating the bot immediately and setting up Welcome automation as per the instructions.

Editing bot steps

Some blocks in the copied bot template are not configured. To edit:

  1. Click Edit in the top right corner.

  2. The participant lands on the “Already received a number?” condition, which checks if the Contest field is filled. This prevents participants from getting multiple numbers.

  3. Click Add Condition, select the numeric field Contest, and choose Filled.

  4. Save the step (Save and Close).

Setting up the “Number Assignment” step

  1. Click the step and select Actions with Fields/Variables.

  2. Choose the global variable (e.g., Number).

  3. Action type: Mathematical operations on value.

  4. Insert the macro for the variable {{Number}} + 1 so that the number increments for each participant.

  5. Add another Action with Fields/Variables.

  6. Select the Contest field, type: Mathematical operations on value, and insert the global variable macro.

This saves the generated number to the participant’s profile.

Save the step (Save and Close).


Sending data to Google Sheets

  1. Configure the Send to Table action.

  2. Map the fields:

    • Number column → Contest field

    • Name column → System field name

    • Username columnUsername (Telegram @username, if available)

  3. Save the step.

Informing participants

  • In the Date & Time step, provide raffle details.

  • In the 10 Minutes Before Start step, set up a reminder using the Schedule block.

  • Remove unnecessary buttons and template instructions in the Late step.

Overview of the template

  • The bot assigns sequential numbers to subscribers.
  • Global variable tracks the counter, increasing by 1 for each new participant.
  • Each subscriber gets a unique number saved in their profile.
  • Numbers can then be used to select winners randomly or assign pre-determined winning numbers.

If you haven’t found the answer to your question, ask us in the chat inside your account, write to us in Telegram at @BotHelpSupportBot, or email us at hello@bothelp.io.

Get 14 days of full access to BotHelp — a platform for creating newsletters, automated funnels, and chatbots.

Get 14 days free

Была ли статья полезна?

Спасибо за обратную связь!