n8n

How to Generate Gmail and Telegram Research Reports?

Create AI researched PDF reports and deliver them by email and chat in minutes. Great for marketing and research teams that need fast summaries, trend scans, or executive briefs. It reduces busy work and keeps the format consistent.

The flow can start on click or be called by another workflow. Input is checked, then a query refiner shapes the topic and creates five related searches. An AI research agent uses OpenAI with NewsAPI, Wikipedia, Google Custom Search, and SerpAPI to gather facts and links. Memory keeps context across steps, and a structured parser and code nodes sort results into clear sections. The system builds styled HTML with a date and file name, converts it to PDF through PDFShift, and then downloads the file. A Google Drive folder check runs before delivery. The PDF and summary go out through Gmail and Telegram, and Google Sheets stores the metadata for tracking.

You will need API keys and OAuth access for the tools listed in the Tools Required section. Expect report creation time to drop from hours to minutes, with reliable citations and repeatable output. Useful for content briefs, campaign research, investor updates, and weekly market notes.

What are the key features?

  • Query refinement generates five targeted search queries for broader coverage.
  • AI research agent uses OpenAI with NewsAPI, Wikipedia, Google Custom Search, and SerpAPI.
  • Simple Memory keeps search context so the agent stays on topic.
  • Structured Output Parser and code nodes normalize sections like intro, findings, and sources.
  • Aggregate step compiles split results into one clean JSON payload.
  • HTML builder creates a branded report with date, file name, and safe character handling.
  • PDF conversion via PDFShift API and a follow up download for a binary file.
  • Google Sheets logging stores topic, date, and links for audit and tracking.
  • Google Drive folder search and If check validate storage location before delivery.
  • Gmail and Telegram nodes send the PDF to recipients with a short caption.

What are the benefits?

  • Reduce manual work from 2 hours to 10 minutes per report
  • Automate 80% of research and formatting steps
  • Improve citation consistency by 90% with structured sources
  • Connect 9 external data and delivery tools in one flow
  • Produce up to 30 reports per day without extra staff

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 OpenAI, SerpAPI, NewsAPI, Google Custom Search, Wikipedia, Google Sheets, Gmail, Google Drive, Telegram and PDFShift. See the Tools Required section above for links to create accounts with these services.
  3. Open the OpenAI model nodes and in the n8n credentials manager create a new OpenAI API Key credential. Paste your API key from your OpenAI account and save.
  4. Double click the SerpAPI tool node and create a new SerpAPI credential. Paste your SerpAPI key from your SerpAPI dashboard.
  5. Open the NewsAPI tool node and set your NewsAPI key. If the node uses a query parameter, place the key in the apiKey field as instructed in the node.
  6. For Google Custom Search, create an API key and a Search Engine ID in your Google Cloud and Programmable Search settings. In the Google Search Web node, add the key and cx parameters and map the query field as shown.
  7. Connect Gmail, Google Sheets, and Google Drive using OAuth2. Double click each node, choose Create new credential, and follow the on screen steps to sign in to the correct Google account.
  8. Create a Telegram Bot with BotFather and copy the bot token. In the Telegram node, create a new credential with the bot token and set the target chat ID.
  9. Open the Convert HTML to PDF node and add your PDFShift API key in the HTTP header or auth field as required by the node configuration.
  10. Configure the Store Research Metadata node to point to your Google Sheet. Set the Spreadsheet, Sheet, and map fields like topic, date, summary, and link.
  11. In the Google Drive Search Folder node, set the folder name or query you plan to use. Run the node once to confirm it finds the correct folder, then verify the If node path.
  12. Set recipients in the Gmail node To field and confirm the Telegram chat ID. Adjust the email subject and caption if needed.
  13. Click Test workflow to run a sample. Check that a PDF link is returned, the PDF is downloaded, an email and Telegram message are sent, and a new row appears in Google Sheets.
  14. Troubleshoot common issues: if PDF is not created, verify the PDFShift key and that the HTML content is passed. If Telegram fails, confirm the bot is added to the chat. If Google nodes fail, recheck OAuth scopes and account access. For empty research, verify API keys for NewsAPI, SerpAPI, and Google Custom Search.

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.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Custom Search

Sign up

Free tier: 100 queries/day; Paid: $5 per 1000 queries (up to 10,000/day)

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

Google Sheets

Sign up

Free: $0 (Google Sheets API usage has no additional cost; quota limits apply)

News API

Sign up

Business: $449 / mo (production use; 250,000 requests / mo). Developer $0 is development-only.

OpenAI

Sign up

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

PDFShift

Sign up

Free plan: $0 / mo, 50 credits / mo via API

SerpAPI

Sign up

Free tier: $0 / mo, 100 searches / mo

Telegram

Sign up

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

Wikipedia

Sign up

Free: $0 (public Wikimedia APIs). Enterprise Free: $0 with 5,000 on‑demand requests / mo and twice‑monthly snapshots

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.