See llms.txt for all machine-readable content.

Back to Templates

Prüfe Behinderungsanzeigen nach § 6 VOB/B mit Telegram, Gemini und Notion

Quick overview

This workflow listens for Telegram messages and checks German construction delay notices (Behinderungsanzeigen) against § 6 VOB/B by sending text, PDFs, or voice notes to Google Gemini, then replies with a structured analysis in Telegram and can optionally archive the result to Notion.

How it works

  1. Triggers when a new private Telegram message is received by the bot.
  2. Validates the sender against an allowlist and checks whether the input is text, a voice note, or a PDF/TXT/CSV document (including size and basic format checks).
  3. Downloads the voice note or document file from Telegram when applicable, or rejects unsupported/invalid inputs with a Telegram reply.
  4. Optionally fetches short German terminology background extracts from Wikipedia and appends them as non-authoritative context.
  5. Sends the prepared content to the Google Gemini API to transcribe voice input (when present) and return a JSON-structured, non-binding § 6 VOB/B completeness and plausibility check.
  6. Splits the resulting transcript/analysis into Telegram-safe message chunks and sends them back to the user, or returns a neutral error message if processing fails.
  7. Optionally prepares a combined report and creates a new page in a Notion database (disabled by default).

Setup

  1. Create/select Telegram bot credentials in n8n and set the same credential on the Telegram trigger, both Telegram file-download steps, and the Telegram reply step.
  2. Add your allowed Telegram user IDs to the allowlist in the input-validation code so unauthorized users are ignored.
  3. Configure a public HTTPS base URL for n8n webhooks (for example via a Cloudflare Tunnel) and set N8N_WEBHOOK_URL/WEBHOOK_URL accordingly so Telegram can reach your trigger.
  4. Add Google Gemini (PaLM) API credentials to the HTTP request step and adjust the model URL if your account requires a different Gemini model that supports audio/PDF input and JSON schema output.
  5. (Optional) Add Notion API credentials, enter your Notion database ID in the report-prep code, share the database with the Notion integration, and enable the Notion save step.