Aggregate Marketing Spend Data with Custom Pivots & VLOOKUPs in Google Sheets
This workflow transforms raw marketing data from Google Sheets into a pivot-like summary table. It merges lookup data, groups spend by name, and appends the results into a clean reporting tab β all automatically, without needing to manually build pivot tables in Sheets.
π§βπ» Whoβs it for
Marketing analysts who track channel spend across campaigns
Small businesses that rely on Google Sheets for reporting
Teams that need automated daily rollups without rebuilding pivot tables manually
βοΈ How it works
Get Marketing Data (Google Sheets) β Pulls raw spend data.
Vlookup Data (Google Sheets) β Brings in reference/lookup fields (e.g., channel labels).
Merge Tables β Joins marketing data and lookup data on the Channel column.
Summarize β Groups data by Name and sums up Spend ($).
Clear Sheet β Wipes the reporting tab to avoid duplicates.
Append to Pivot Sheet β Writes the aggregated results into the "render pivot" sheet.
The result: a pivot-style summary table inside Google Sheets, automatically refreshed by n8n.
π Setup Instructions
-
Connect Google Sheets (OAuth2) In n8n β Credentials β New β Google Sheets (OAuth2)
Sign in with your Google account and grant access
In each Google Sheets node, select your Spreadsheet and the appropriate Worksheet:
data (raw spend)
Lookup (channel reference table)
render pivot (output tab) -
Configure Summarize Node Group by: Name
Summarize: Spend ($) β sum -
Test the Workflow Execute the workflow manually
Check your "render pivot" tab β it should display aggregated spend by Name
π οΈ How to customize
Change grouping fields (e.g., by Channel, Campaign, or Region)
Add more aggregations (e.g., average CPC, max impressions)
Use the Merge node to join extra data sources before summarizing
Schedule execution to run daily for fresh rollups
π Requirements
n8n (Cloud or self-hosted)
Google Sheets account with structured data in data and Lookup tabs
π¬ Contact
Need help customizing this (e.g., filtering by campaign, sending reports by email, or formatting your pivot)?
π§ rbreen@ynteractive.com
π Robert Breen
π ynteractive.com
Related Templates
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
β‘ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments