Telegram trigger
Receives an update from an opted-in chat.
Zero to MVP AI Bootcamp
Understand automation platforms, learn n8n, and build the first working version of a personal appointment agent on Telegram.
Today you ship
A consent-based Telegram agent in n8n that gathers booking requirements, contacts an approved provider chat, proposes an available slot, and confirms the user's choice.
Scroll to move through the presentation.
Build, test, checkpoint, and ship.
Automation tools connect systems and execute repeatable work after a trigger. They are strongest when rules and steps are known. AI can interpret flexible language inside a workflow, but validation, consent, communication, booking, and recovery should remain explicit.
A Telegram message starts a workflow. The system validates the chat, extracts scheduling fields, asks for missing information, waits for consent, contacts an approved provider chat, and records the outcome.
| Concept | Best when | Booking example |
|---|---|---|
| Manual work | Judgment, empathy, or exceptions dominate | Clinic staff resolves an unusual request |
| Normal software | The rule must be predictable and immediate | Validate a date or authorized chat ID |
| Automation | Known steps connect several systems | Send, wait, record, remind, and retry |
| AI-assisted workflow | One step interprets variable language | Extract service and preferred dates from a message |
| Agent | The next approved action varies with context | Clarify missing details or choose a safe booking tool |
Apply the concept
Success looks like
Every step uses the least complex mechanism that can perform it reliably and safely.
Watch for
Automation platforms make different trade-offs. Hosted tools reduce operations, self-hostable tools increase control, workplace suites integrate with their ecosystems, and custom code provides precision at a higher engineering cost.
The workshop chooses n8n because the booking flow needs visible branches, webhooks, Telegram and HTTP integrations, reusable sub-workflows, execution history, and the option to control hosting.
| Concept | Typical strength | Important trade-off |
|---|---|---|
| n8n | Flexible visual workflows, APIs, code, and self-hosting option | You own more design and possibly operations |
| Zapier | Fast hosted business automation and broad app catalog | Complex flows and high volume can increase cost |
| Make | Visual data mapping and multi-step scenarios | Large scenarios need disciplined structure |
| Power Automate | Microsoft 365, Azure, and enterprise governance | Licensing and environment governance can be complex |
| Custom code | Maximum control, testing, and product integration | Highest engineering and maintenance responsibility |
Capabilities, plans, and limits change. Confirm current product documentation before selecting a platform.
Apply the concept
Success looks like
The platform choice is justified by requirements and operational ownership, not by the longest connector catalog.
Watch for
An n8n workflow is a visible program. Nodes receive items, expressions map values, branches apply rules, credentials authorize integrations, and execution history shows what happened. Reliability comes from normalized input, durable state, idempotency, and explicit failure handling.
A Telegram Trigger receives an update. n8n validates the chat and update ID, normalizes text into a common event, loads conversation state, routes the next question, saves state, and sends one reply.
Every incoming update passes through control points before the workflow replies or acts.
Receives an update from an opted-in chat.
Checks chat identity, role, and permitted bot action.
Rejects an update ID that was already processed.
Creates one predictable internal event shape.
Reads the current conversation and pending approval.
Chooses a deterministic question, wait, action, or error branch.
Commits the transition before sending one response.
Records outcome, timing, and safe diagnostic evidence.
Apply the concept
Use this prompt
Review this n8n Telegram workflow as a reliability engineer. Check authorization, normalized event shape, durable state, idempotency, bounded retries, timeout, error routing, credential use, and privacy-safe execution data. Explain failure modes before suggesting node changes.
Success looks like
The same Telegram update can be delivered twice while producing one state transition and one intended reply.
Watch for
Telegram bot communication is permission-based. A bot cannot initiate a private conversation with an arbitrary phone number. The requester and provider must start the bot, add it to an approved chat, or otherwise provide a usable chat identity through an authorized onboarding process.
The requester starts the bot and asks for an appointment. The clinic has already started the provider bot or added it to an approved scheduling group. The workflow may message those verified chat IDs, but it cannot discover and contact a doctor merely from a phone number.
The workflow coordinates two opted-in chats and never treats a proposal as a confirmed booking.
The user starts the bot and submits an appointment goal.
The workflow collects only required scheduling fields.
The user reviews recipient and exact information to send.
An approved clinic or salon chat receives the request.
The provider returns one or more available options.
The requester accepts one exact slot or declines.
The provider records the appointment and returns confirmation.
The final status and reference are sent to both parties.
Apply the concept
Success looks like
Every message has an authorized sender, valid state transition, explicit recipient, and predictable next action.
Watch for
The doctor workflow coordinates scheduling, not healthcare. It gathers the minimum information a clinic needs to offer an appointment, obtains consent before sharing, and redirects emergencies, diagnosis, treatment, or medication questions to appropriate human services.
The requester asks for a dermatologist next week in Cairo. The agent gathers visit type, preferred days, location, name, contact method, and an optional short scheduling note, then shows the exact clinic message before sending it.
Apply the concept
Use this prompt
Turn this doctor appointment request into scheduling fields only: appointment type or specialty, location, preferred dates and times, requester name, contact method, and optional short scheduling note. Ask one focused question at a time. Do not diagnose, triage, recommend treatment, or infer medical facts. Before sharing, display the exact recipient and fields and require explicit consent.
Success looks like
A clinic-confirmed appointment is created with minimum information and two explicit approvals: before provider contact and before booking the proposed slot.
Watch for
A reusable booking system separates universal coordination from service-specific policy. Request, consent, provider contact, slot proposal, user approval, confirmation, reminder, and cancellation remain shared. Required fields and provider rules change.
Salon mode asks for service, branch, stylist preference, approximate duration, preferred times, name, and contact method. It does not run the doctor-specific safety branch unless a health-related request enters the conversation.
| Concept | Doctor appointment | Salon appointment |
|---|---|---|
| Service need | Appointment type or specialty | Haircut, styling, color, or another service |
| Provider choice | Approved clinic or practitioner category | Branch and optional stylist |
| Time input | Preferred dates and times | Preferred dates, times, and service duration |
| Sensitive boundary | No diagnosis, treatment, or unnecessary health details | No invented prices, duration, services, or availability |
| Shared controls | Consent, proposal, confirmation, cancellation, retry | Consent, proposal, confirmation, cancellation, retry |
Apply the concept
Use this prompt
Create a salon booking configuration for the existing appointment workflow. Require service, branch or location, stylist preference if any, preferred dates and times, requester name, and contact method. Keep consent, provider proposal, user approval, confirmation, cancellation, idempotency, and timeout behavior shared.
Success looks like
The same core workflow completes a salon appointment by loading a different policy rather than duplicating the doctor workflow.
Watch for
Messaging systems retry, people respond late, and providers change availability. Trustworthy automation records one event once, correlates both conversations, expires stale proposals, and leaves each participant in a clear state.
Telegram delivers the provider response twice. The workflow recognizes the update ID, records one proposal, and sends one approval request. If the proposal expires, confirmation is blocked and the provider is contacted again.
Apply the concept
Success looks like
Every test reaches one explainable final or recoverable state without duplicate contact or booking.
Watch for
Build brief
Build the deterministic n8n and Telegram foundation for a personal agent that coordinates doctor and salon appointments.
User story
As a requester, I can describe the appointment I need, approve what is shared, review a provider's proposed slot, and explicitly confirm or cancel it.
Register the bot securely and bind requester and approved provider test chats.
Normalize updates, load conversation state, route actions, and record idempotency keys.
Collect only the required doctor or salon scheduling fields and validate them.
Show the exact provider message and wait for explicit requester approval.
Send the request to the approved clinic or salon Telegram chat and capture proposed slots.
Ask the requester to accept or reject before creating the booking and notifying both parties.
Run both service types plus duplicate, timeout, cancellation, and retry cases.