@iamsajaldubey
Module 09A neighbourhood concierge bot
@iamsajaldubey
PROJECT LAB / MODULE 09

A neighbourhood concierge bot

Make a bot answer the right question and show its limits clearly.

The situation

Residents ask your fictional bot about the next meetup. It should answer confirmed facts, show help and acknowledge unknown commands. It must not promise to be a human organizer.

Your goal

Build a Telegram test bot with explicit commands, safe credentials and a fallback path.

A first win

Draft the correct /next response from the approved brief.

Keep this artifact

A tested bot, a command table and a webhook troubleshooting note.

Explore the mechanism

This interactive model teaches the mechanism. It does not call a model, search your files or send messages.

Why this works

A bot has an event boundary

A Telegram message creates an update. A trigger receives it, a workflow chooses a reply and the Telegram API sends the response. A text prompt alone is not a deployed bot.

One webhook needs a clear owner

Test and production configurations can compete for a bot webhook. Use a dedicated test bot and understand which workflow currently receives its updates.

Unknown commands need a route

A resident should get useful help when a command is absent or unsupported. Silence and invented answers both make a bot hard to trust.

Build it, step by step

  1. Create a test identity

    Use BotFather to create a dedicated test bot. Store the token only in n8n credentials. Write an intro saying this is an automated demo.

    Check: The bot has a clear identity and the token is not in slides or public files.

    Need a hint?

    Use a separate test bot from an existing community bot.

  2. Prepare the command table

    Define /start, /help and /next plus a fallback. The /next response uses only the approved Saturday10:00 community-room brief.

    Check: Every supported command has one expected response.

    Need a hint?

    Do not add unknown perks or live facts.

  3. Configure delivery

    Add Telegram Trigger and connect credentials in n8n. Confirm that the webhook URL is public HTTPS from the trigger execution environment.

    Check: Your own test message reaches the correct workflow.

    Need a hint?

    A laptop localhost URL cannot be reached by Telegram without a suitable public webhook setup.

  4. Route and reply

    Use explicit command conditions or a Switch node. Connect Telegram Send Message to the received chat ID.

    Check: Each command replies only to the chat that sent the test request.

    Need a hint?

    Do not hardcode a public group ID for this exercise.

  5. Test failure cases

    Send unknown text, a missing command and /next. Check the execution log. If delivery stops, inspect test/production webhook ownership.

    Check: Fallback and confirmed facts work; logs show input and chosen route.

    Need a hint?

    Telegram bots cannot generally start a private chat with someone who has never contacted them.

  6. Hand off the bot

    Document commands, token rotation location, active workflow, fallback and the approval step needed before adding it to a community group.

    Check: Another organizer can troubleshoot one failed update.

    Need a hint?

    Do not include the token in the handoff document.

Build with a clear contract

Design a Telegram test-bot command table for /start, /help, /next and unknown text. Approved /next facts: Saturday10:00, community room, free entry. Identify the bot as an automated demo. Explain the n8n Telegram Trigger to routing to Send Message flow, mapping reply chat ID from the update, public HTTPS webhook requirements, test/production webhook conflicts and private token storage. Keep unsupported answers unknown.

When it goes sideways

The workflow receives no updates

Webhook URL is unreachable or another workflow owns it.

Try: Check public HTTPS and use one active test/production owner.

Replies reach the wrong chat

A chat ID was hardcoded.

Try: Map the chat ID from the current trigger update.

The bot invents answers

An unbounded AI step replaced a known command table.

Try: Use explicit approved responses first and retain an unknown-answer path.

Review your evidence

Tick a criterion only after checking your own artifact. These are self-reported checks, not an automated certification.

Make it your own

Add a source-backed FAQ

Add two more approved FAQ entries and an unknown-answer route. Then compare a fixed table with an optional retrieval-based draft.

  • Every FAQ has a source.
  • Missing answers are acknowledged.
  • An organizer can revoke or update a fact.

Check the mental model

What identifies the reply destination?

Why use a dedicated test bot?

Remember the distinction

A bot has an event boundary

One webhook needs a clear owner

Unknown commands need a route

Go to the source

Original community projects. Interactive scenes are teaching simulations. Tool outputs vary. Your evidence stays on this browser unless you export it.