Skip to content

Chapter 2: Identify the user

In this chapter you’ll build the start of the flow: receive the Telegram message, look up its sender in the Users table and keep their name and permission.

Create a blank project, for example Inventory bot.

The components

ComponentName on the canvasWhat for
Telegram WebhookTelegram WebhookReceives the messages that reach the bot.
Parse Datachat idGets the sender’s identifier and prepares the search.
Airtableusers tableLooks that person up in the Users table.
Parse Datawrite permissionGets their permission.
Parse DatausernameGets their name.

To change a component’s name on the canvas, use the pencil icon in its settings panel.

Connect them

FromOutputToInput
Telegram WebhookDatachat idData
chat idTextusers tableFilter by Formula
users tableResultwrite permissionData
users tableResultusernameData

Configure them

Telegram Webhook

  • Credential: your bot credential.

chat id

  • Template: chatid = {body.message.from.id}. It writes the search condition with the Telegram identifier of whoever sent the message.

users table

  • Credential: your Airtable credential.
  • Operation: Read.
  • Mode: Advanced. This makes the Filter by Formula field appear, which receives the search condition.
  • Base Name: your base.
  • Table Name: Users.

write permission

  • Template: {Admin permissions}.

username

  • Template: {Username}.

When you finish, the flow has the three pieces of data the agent needs: the user’s message, their permission and their name.