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
| Component | Name on the canvas | What for |
|---|---|---|
| Telegram Webhook | Telegram Webhook | Receives the messages that reach the bot. |
| Parse Data | chat id | Gets the sender’s identifier and prepares the search. |
| Airtable | users table | Looks that person up in the Users table. |
| Parse Data | write permission | Gets their permission. |
| Parse Data | username | Gets their name. |
To change a component’s name on the canvas, use the pencil icon in its settings panel.
Connect them
| From | Output | To | Input |
|---|---|---|---|
| Telegram Webhook | Data | chat id | Data |
| chat id | Text | users table | Filter by Formula |
| users table | Result | write permission | Data |
| users table | Result | username | Data |
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.