n8n: Telegram bot token, chat ID and OpenRouter key

n8n connects services, but the services issue the access themselves. The ready-made workflows need three things: a Telegram bot token, your chat ID and an OpenRouter key (AI bot only).

Telegram bot token

  1. Open @BotFather in Telegram and send /newbot.
  2. Enter the bot name, then its username - it must end with bot, for example myshop_helper_bot.
  3. BotFather replies with a token like 123456789:AA.... Copy it.
  4. Open your bot in Telegram and press Start - otherwise it cannot message you.

Your chat ID

The lead form and website monitor send messages to you personally, so they need the numeric ID of your chat. Message @userinfobot - it answers with a number like 123456789. A group ID starts with a minus; the bot must be added to the group.

OpenRouter key

openrouter.ai is one key for many AI models (GPT, Claude, Gemini, Llama and more). Registration is free, billing is per use.

  1. Sign up at openrouter.ai (Google sign-in works).
  2. Keys -> Create API Key. Copy the key sk-or-... - it is shown once.
  3. Credits - top up a few dollars. Models tagged :free cost nothing and are enough for testing.

Storing keys in n8n

Keys live in n8n as Credentials and are selected in workflow nodes. Open a workflow and double-click the Telegram node - the parameter panel has a Connect to Telegram button:

Telegram Trigger node: Connect to Telegram button
Telegram Trigger node: Connect to Telegram button

Press it, paste the token into Access Token and save. The same credential can be selected in every Telegram node.

Telegram credential dialog: Access Token field
Telegram credential dialog: Access Token field

Same for OpenRouter: node OpenRouter Chat Model -> Connect to OpenRouter -> API Key.

OpenRouter credential dialog: API Key field
OpenRouter credential dialog: API Key field

All saved keys are listed on the Credentials tab of the home screen, where they can be renamed or deleted.

Credentials tab
Credentials tab

The bot token and the OpenRouter key are passwords. Do not publish them or paste them into workflow code: Credentials only. If a token leaks, send /revoke to @BotFather; delete the OpenRouter key under Keys.

Next: enable the ready-made workflows.

Questions and answers
Registration and the key are free. Paid models deduct cents per request from your balance; models tagged :free cost nothing.
Yes. Replace the OpenRouter Chat Model node with OpenAI Chat Model and attach a credential with your OpenAI key.
Press Start in the chat with the bot, make sure the workflow is published, and check the Executions tab - it shows the error.