Setup

About 15 minutes. You will create a Telegram bot, copy the Google Sheet template, deploy the Web App, and bind your Telegram account.

Before you start
  1. A Google account with Gmail.
  2. Your Telegram account.
  3. The browser you will use for the Google steps (desktop is easiest).

You will do everything else inside your own account.

1. Create your bot in BotFather

BotFather is Telegram's official bot for creating bots.

  1. In Telegram, search for @BotFather and open it.
  2. Send the /start command. Then the /newbot command.
  3. Give the bot a name, then a username. The username must end in bot, for example my_deal_watch_bot.
  4. BotFather replies with an HTTP API token. Copy it and keep it private — it is the key to your bot.
BotFather answering with a new bot token
BotFather replies with the token for your new bot. Keep it private.

2. Copy the Sheet template

Open the template in Google Sheets and make your own copy. Everything runs from this copy, in your own Google account.

  1. Open the Deal Watch template in Google Sheets.
  2. In the Sheet, choose File > Make a copy, then save it to your own Google Drive.
  3. Open your copy. It is a normal Google Sheet, with Deal Watch attached to it.

You do not need edit access to the template — just make a copy.

3. Deploy the Web App

Telegram needs a public URL to send your button taps to. You create that once, from the Sheet's script editor.

  1. In your copied Sheet, open Extensions > Apps Script.
  2. Click Deploy > New deployment.
  3. Click the gear next to "Select type" and choose Web app.
  4. Set Execute as to Me.
  5. Set Who has access to Anyone.
  6. Apps Script New deployment settings for a Web app
    Web app, executed as you, accessible to anyone.
  7. Click Deploy.
  8. "Google hasn't verified this app"

    This warning is expected. It appears because the script is your own private copy, not an app published to the Google Store. To continue:

    1. Click Advanced
    2. Go to (your project name) (unsafe)
    3. Select all permission
    4. Click Continue

    You are granting your own script access to your own Gmail and Sheet.

    Google unverified app warning with the Advanced link
    Click Advanced, then Go to <your project name>.
    Google request permission
    Select all permission, then Continue.
  9. Copy the Web app URL. It must end with /exec, not /dev.
  10. The Web app URL ending in /exec
    Copy the URL that ends with /exec. The /dev URL will not work with Telegram.

4. Run Deal Watch > Setup

Back in your Sheet, the Deal Watch menu appears at the top. If you do not see it, reload the Sheet.

  1. Click Deal Watch > Setup.
  2. Deal Watch > Setup button
  3. When prompted, paste your bot token from Step 1.
  4. Setup prompting for the bot token
  5. When prompted again, paste your Web app URL from Step 3.
  6. Setup prompting for the Web app URL

5. Bind your Telegram account

When Setup finishes, it shows a one-time link. This is the final step, and the only part done in Telegram.

  1. Open the link Setup shows, or send the suggested /start <token> message to your bot.
  2. Your bot replies to confirm. From now on it listens only to your Telegram account.
Setup showing the one-time Telegram bind link
Open the bind link, or send /start <token> to your bot.
Telegram showing the bot connected
The bot confirms you are connected.

6. Test it

  1. Send /add to your bot and add a rule for a sender you control (or a sender that emails you often).
  2. Send a test email to yourself from that sender containing one of your keywords.
  3. Wait for the next check. The default interval is 15 minutes.
  4. You should receive one digest message. Nothing to report means no message.

See Usage for the full command list and everyday tips.

Running Setup again

Setup is safe to re-run:

To move to a newer release of the code, see Updating in Usage.

Stuck?

See the FAQ for the common setup problems and what they mean.