Quick overview
This workflow turns a Telegram bot into a website audit assistant: it extracts a URL from incoming Telegram messages, scrapes the page, uses OpenAI (gpt-4o-mini) to generate a structured audit, logs the results to Google Sheets, and replies back in Telegram.
How it works
- Triggers when a new message is sent to your Telegram bot.
- Extracts the first URL from the message text and, if none is found, sends a help reply back to the same Telegram chat.
- Fetches the submitted website’s HTML content over HTTP and converts it into cleaned, readable text for analysis.
- Sends the cleaned page content to OpenAI (gpt-4o-mini) to generate a structured audit (business type, score, issues, quick wins, recommendation, opportunity, and talking points).
- Formats the audit into a plain-text Telegram message and appends the audit details as a new row in a Google Sheets tab.
- Replies to the original Telegram chat with the completed audit.
Setup
- Create a Telegram bot with @BotFather and add a Telegram API credential in n8n, then connect it to the Telegram trigger and both Telegram send-message steps.
- Add an OpenAI API credential and connect it to the OpenAI chat model used for the audit.
- Add a Google Sheets OAuth2 credential and connect it to the Google Sheets append step.
- Create a Google Sheets document with a tab named “Website Audits” and the required headers, then update the Sheet ID (and your name) in the workflow’s configuration step.