Data Processing & Analysisintermediate
September 23, 2025
6 min read
35 minutes
Generate Marketing Reports from Google Sheets with GPT-4 Insights and PDF.co - n8n Workflow
Automate marketing reports with n8n. Pull data, generate AI insights, create branded PDFs, and deliver via Gmail & Telegram in minutes.
By Kazi Sakib

Marketing teams drown in spreadsheets every day. They spend countless hours pulling data from different sources, calculating spend across channels, writing summaries, and manually creating reports for stakeholders. This tedious process eats up valuable time that could be spent on strategy and optimization. What if you could automate the entire reporting pipeline from data collection to distribution, complete with AI-generated insights?
This n8n workflow solves exactly that problem by creating an end-to-end automated marketing report system. It pulls data from Google Sheets, processes spending information across channels, generates AI-powered summaries using GPT-4, creates professional PDF reports, and automatically distributes them via email and Telegram. The entire process runs with a single click, transforming hours of manual work into seconds of automation.
Prerequisites: What You'll Need to Get Started
Before diving into the workflow construction, you'll need access to several key services and their corresponding API credentials:
- Google Sheets API: For accessing your marketing data stored in spreadsheets
- OpenAI API: To leverage GPT-4 for generating intelligent report summaries
- PDF.co API: For converting your data into professional PDF reports using custom templates
- Gmail API: To send email notifications with report attachments
- Telegram Bot API: For instant messaging capabilities and document sharing
Each service requires proper authentication setup within n8n. The beauty of this workflow lies in how these different tools work together seamlessly to create a comprehensive reporting solution.
Key Components: The Building Blocks of Your Automation
This workflow leverages several powerful n8n nodes that each play a specific role in the reporting pipeline:
- Manual Trigger: Initiates the workflow execution on demand
- Google Sheets Node: Fetches marketing spend data from your spreadsheet
- Summarize Nodes: Aggregate spending data by channel and calculate totals
- OpenAI Chat Model & Agent: Generate intelligent summaries using GPT-4
- Structured Output Parser: Ensures consistent AI response formatting
- Code Node: Transforms data for PDF template compatibility
- PDF.co API Node: Creates professional PDF reports from HTML templates
- HTTP Request Node: Downloads the generated PDF file
- Gmail Node: Sends email notifications with attachments
- Telegram Nodes: Delivers instant messaging and document sharing
Step 1: Setting Up Data Collection and Processing
The workflow begins by connecting to your Google Sheets document containing marketing data. The Google Sheets node pulls all campaign information, including spend amounts and channel classifications. This raw data then flows into two parallel processing streams.
The first stream uses a Summarize node to group spending by marketing channel, creating a breakdown that shows exactly how much was invested in each channel like Facebook, Google Ads, or email marketing. The second stream calculates the total spend across all channels, providing the big picture number that executives love to see.

An Aggregate node then combines the channel-level data into a single row, preparing it for the AI analysis phase. This step ensures that all your data is properly formatted and ready for intelligent processing.
Step 2: Generating AI-Powered Insights
Here's where the magic happens. The processed data flows into an OpenAI Chat Model configured with GPT-4, which analyzes your marketing spend patterns and generates a four-sentence executive summary. The AI doesn't just regurgitate numbers; it provides context and insights about your marketing performance.

A Structured Output Parser ensures the AI response follows a consistent JSON format, making it easy to integrate with the rest of your workflow. This eliminates the unpredictability often associated with AI-generated content and guarantees reliable output every time.
The system prompt instructs the AI to focus on creating daily update messages that highlight key trends, significant spending patterns, and actionable insights that help guide future budget decisions.
Step 3: Combining Data and Preparing for Report Generation
A Merge node brings together three crucial data streams: the total spend calculation, the channel breakdown, and the AI-generated summary. This combination creates a comprehensive dataset that contains both quantitative metrics and qualitative insights.
The data then flows into a custom JavaScript Code node that performs several important transformations. It formats currency values using proper USD formatting, structures the data for the PDF template, adds the current date, and creates a clean object that the PDF generation service can consume.
This step handles all the formatting nuances that make your final report look professional, from proper currency symbols to date formatting that matches business standards.
Step 4: Creating Professional PDF Reports
The formatted data reaches the PDF.co API node, which uses a pre-configured HTML template to create a polished PDF report. This isn't just a basic data dump; it's a professionally formatted document that you'd be proud to share with stakeholders.
The template includes your company branding, proper spacing, charts, and a clean layout that makes the information easy to digest. The AI-generated summary appears prominently, while the detailed channel breakdown provides the supporting data that finance teams need.

An HTTP Request node then downloads the generated PDF, making it available for distribution through multiple channels.
Step 5: Automated Distribution and Notifications
The final step handles report distribution through multiple channels simultaneously. A Gmail node sends a professional email to stakeholders with the PDF attached, complete with a personalized message that includes the report date and key highlights.
Meanwhile, two Telegram nodes work in tandem: one sends an immediate text notification about the new report, while another delivers the actual PDF document. This dual-channel approach ensures that busy executives get instant notifications on their phones while also receiving the detailed report they need.

The email template includes professional language and proper attribution, while the Telegram messages are concise and action-oriented, perfect for mobile consumption.
Benefits and Creative Use Cases
This automated marketing report workflow delivers immediate value through time savings and consistency. What once took hours of manual work now completes in minutes, freeing your team to focus on strategic initiatives rather than data compilation.
The AI-generated insights add intelligence to your reporting process, often highlighting patterns and trends that might be missed in manual analysis. These summaries become talking points for strategy meetings and help identify optimization opportunities.
Beyond basic marketing reports, this workflow architecture can be adapted for numerous scenarios. E-commerce businesses can track product performance across channels. Agencies can automate client reporting. SaaS companies can monitor user acquisition costs by source.
The multi-channel distribution approach ensures that information reaches stakeholders through their preferred communication methods. Some prefer email for detailed analysis, while others want instant Telegram notifications for quick updates.
Perhaps most importantly, this workflow creates a consistent reporting cadence that keeps everyone aligned on marketing performance. Regular, automated reports eliminate the excuse of "we didn't have time to create the report" and ensure data-driven decision making becomes routine rather than exceptional.
Ready to transform your marketing reporting from a time-consuming chore into an intelligent, automated system? This n8n workflow provides the foundation for professional-grade marketing analytics that scales with your business needs.
Share this article
Help others discover this content
Tap and hold the link button above to access your device's native sharing options
More in Data Processing & Analysis
Continue exploring workflows in this category

Data Processing & Analysisadvanced
1 min read
News Aggregator AI Agent - n8n Workflow
Kazi Sakib
Sep 23
Est: 55 minutes

Data Processing & Analysisadvanced
1 min read
n8n Workflow for Brand Monitoring – X Mentions + Gemini Visual Analysis + Telegram Alerts
Nayma Sultana
Sep 23
Est: 50 minutes

Data Processing & Analysisbeginner
1 min read
Browsing History Automated Analyzer – n8n Workflow
Nayma Sultana
Sep 18
Est: 30 minutes