n8n

How to Automate Telegram YouTube Summaries and Q and A?

Turn YouTube links into clear summaries and instant answers inside Telegram. Share a link by message or webhook, get a structured recap, store the transcript in Google Docs, and ask follow up questions without leaving chat. Ideal for content teams, creators, and marketers who need quick takeaways from video.

Here is how it works. A Telegram message or webhook provides a YouTube URL. A Set step reads the link, then a Code step parses the video ID. The workflow fetches the transcript, splits it for clean processing, and merges it into one text block. An OpenAI prompt creates a concise, structured summary. Results are sent back to Telegram and returned to the webhook. The transcript is also written to a Google Doc, which the AI agent uses to answer questions in Telegram. A memory buffer keeps short context for better follow ups.

Setup needs a Telegram bot token, an OpenAI API key, and Google Docs access. Expect to cut video review time from half an hour to a few minutes while keeping answers accurate because they come from the transcript. Common uses include daily video recaps for teams, answering audience questions, and turning training clips into quick reference notes.

What are the key features?

  • Accept YouTube links from Telegram messages or a webhook endpoint
  • Parse the video ID from the URL using a Code node
  • Pull the full video transcript automatically
  • Split and rejoin transcript text for clean input to the AI model
  • Generate a structured summary with an OpenAI chat model
  • Send the summary back to Telegram and respond to the webhook request
  • Write the transcript into a Google Doc to act as long term memory
  • Use an AI agent with memory to answer questions about the video in Telegram
  • Maintain short chat context with a window memory buffer for better follow ups

What are the benefits?

  • Reduce manual review from 30 minutes to 3 minutes per video
  • Answer viewer questions in Telegram any time using the transcript
  • Connect Telegram, YouTube, Google Docs, and OpenAI in one flow
  • Handle up to 10 times more video requests without extra staff
  • Improve answer accuracy by using the exact video transcript as the source

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Telegram, OpenAI, Google Docs, YouTube and Apple Shortcuts. See the Tools Required section above for links to create accounts with these services.
  3. In Telegram, create a bot with BotFather and copy the bot token. In the n8n credentials manager, create Telegram credentials using that token. Double click the Telegram Trigger and Telegram Send nodes and select your Telegram credential.
  4. In OpenAI, create an API key from the API keys page. In n8n, create OpenAI credentials with this key. Open the OpenAI and AI nodes, choose your OpenAI credential, and select the model.
  5. For Google Docs, create a Google account with access to the target document. In n8n, create Google Docs OAuth2 credentials. Open the Google Docs nodes and pick this credential.
  6. Replace the hardcoded Google Doc ID with your own document link in both Google Docs nodes. Make sure your Google account can edit the document.
  7. Open the Webhook node. Copy the production URL. In Apple Shortcuts or any app that can send web requests, post a JSON body with a field named url or chatInput containing the YouTube link. Send a test request.
  8. Update the Code node that extracts the video ID so it outputs a field named videoId. If using Python, parse the URL query string and set item.json.videoId to the v parameter.
  9. Run a test by sending a YouTube link to your Telegram bot. You should receive a summary message. Also check the webhook response if you used the webhook path.
  10. Verify the transcript is written to your Google Doc. Then send a question in Telegram about the video content. Confirm the AI agent answers based on the document.
  11. If no transcript returns, the video may not have subtitles. Try another video or add a fallback message in the flow. If Telegram messages do not arrive, confirm the bot token and chat ID.
  12. Monitor runs in the n8n executions list. Add simple checks or error messages after the transcript and AI steps to handle missing data gracefully.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Apple Shortcuts

Sign up

Free: $0 (Shortcuts app; no API pricing—use Get Contents of URL to call webhooks)

Google Docs

Sign up

Free: $0, Google Docs API usage at no additional cost (quota limits apply)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Telegram

Sign up

Free: $0, Telegram Bot API usage is free for developers

YouTube

Sign up

Free: $0, default quota 10,000 units/day

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.