Get Started
Screenshot of n8n workflow
FREE TEMPLATE
Automate Google Analytics Campaign Tracking
13
Views
0
Downloads
14
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
Marketing
Automation Orchestrator
n8n
Integrations
OpenAI
Google Analytics
Gmail
Airtable
Trigger Type
Manual trigger
Schedule
Approx setup time ≈ 55 min
Need help setting up this template?
Ask in our free Futurise community
About
Community
Courses
Events
Members
Templates

How to Automate Google Analytics Campaign Tracking?

Leon Petrou
FREE TEMPLATE
Automate Google Analytics Campaign Tracking
13
Views
0
Downloads
14
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
Marketing
Automation Orchestrator
n8n
Integrations
OpenAI
Google Analytics
Gmail
Airtable
Trigger Type
Manual trigger
Schedule
Approximate setup time ≈ 55 minutes
Need help setting up this template?
Ask in our free Futurise community

Description

Turn campaign links into trackable assets and get clear email summaries on a schedule. Marketers enter a website and UTM details once, then the system saves the link, makes a QR code, and later reports results from Google Analytics. This is helpful for teams that run ads, print pieces, events, or partner promos.

On a manual run, inputs flow through a set step and a code step that build a clean UTM URL. The link is upserted into an Airtable table for easy logging, and a QR image is created through a simple HTTP call. A schedule trigger then queries GA4 for sessions by sourceMedium using your property. An AI agent powered by OpenAI turns the dataset into a short executive summary, and Gmail delivers it to your marketing lead.

Set up an Airtable base with a URL field, connect your Google Analytics property, and choose the recipient email. Expect faster launch of campaigns, fewer tagging mistakes, and clear feedback on what channels drive visits. This setup works well for flyers, events, billboards, and any campaign that needs a QR code and proof of traffic. Many teams see link build time drop from minutes to seconds and save about an hour each reporting cycle.

Copy link

Tools Required

OpenAI
Sign up
Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens
n8n
Sign up
$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.
Google Analytics
Sign up
Free (GA4 standard): $0; API access included and subject to quotas
Gmail
Sign up
No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)
Airtable
Sign up
Free (1,000 API calls / mo)

What this workflow does?

  • Manual start collects website and UTM values through a set step
  • Code step builds a standard UTM URL from your inputs
  • Airtable upsert stores the final link for a clean audit trail
  • HTTP request generates a QR code for the UTM link via QuickChart
  • Schedule trigger runs GA4 queries on a set interval
  • Google Analytics node tracks sessions by sourceMedium for your property
  • OpenAI agent turns raw numbers into an executive summary
  • Gmail sends the summary to your marketing lead

What are the benefits?

  • Reduce manual work from 30 minutes per link to 2 minutes
  • Automate weekly reporting and save about 1 hour per week
  • Improve UTM data quality by 90 percent with a standard format
  • Handle up to 10 times more campaign links without extra staff
  • Connect Airtable, Google Analytics, OpenAI, and Gmail in one flow

How to set this 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 Google Analytics, Airtable, Gmail and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, open the OpenAI credential. If it does not exist, double click the OpenAI node, choose Create new credential, and follow the on screen steps to add your API key. Name it clearly, for example OpenAI Prod.
  4. In the credentials manager, set up Google Analytics. If unsure, double click the Google Analytics node, choose Create new credential, and complete the OAuth flow with the Google account that has access to your GA4 property.
  5. In the credentials manager, set up Gmail. Double click the Gmail node, choose Create new credential, and finish the OAuth flow. Use the account you want to send reports from.
  6. In the credentials manager, add Airtable. Double click the Airtable node, choose Create new credential, and paste a Personal Access Token from your Airtable account. Give it a clear name such as Airtable PAT Prod.
  7. In Airtable, create a base and a table with a field named URL as a single line text field. Copy the base and table IDs if needed.
  8. Open the Set UTM Parameters For Link node in n8n and enter default values for website_url, campaign_source, campaign_medium, campaign_name, and campaign_term. You can update these before each manual run.
  9. Open the Create UTM Link With Parameters node to confirm the UTM format. Run a manual test and check that the utmUrl field looks correct.
  10. Run the manual trigger. Confirm a new record appears in Airtable with the URL value. Open the HTTP request node output and test the QR image to ensure it scans to the same UTM link.
  11. Open the Google Analytics node and set your property ID. Keep the Sessions metric and sourceMedium dimension or adjust as needed. Test the node and verify rows are returned.
  12. Open the Google Analytics Data Analysis Agent node, make sure the OpenAI credential is selected, and run a test. Then open the Gmail node and send a test message to confirm delivery.
  13. Set the schedule interval in the Schedule Google Analytics Report node. Save and activate the workflow. Check your time zone to ensure reports arrive when expected.
  14. If something fails, check permissions on the GA4 property, confirm the Airtable table and field names match, verify the Gmail account can send messages, and ensure your OpenAI key has quota.

Need help or want to customize this?

Similar Templates

n8n
Marketing
Generate YouTube Shorts from Google Sheets
Create short videos for YouTube by pulling a quote and creative prompts from Google Sheets, building the background image and video with AI, adding ambient sound, and publishing the final clip to your channel. Great for social teams and creators who want steady content without manual editing. A manual start reads one row from Google Sheets with the quote, author, and scene prompts. The flow calls an image model to render a vertical image, waits, then writes the image link back to the sheet. It then sends that image to a video model to produce a cinematic vertical clip, waits again, downloads the file, and records the video link in the sheet. Audio is generated with a voice and sound service, stored to Google Drive, and the drive link is saved. A code node formats overlay text, then FFmpeg merges video, audio, and on screen text into a final MP4. The clip uploads to YouTube with a resumable upload, and the sheet is updated with status and the YouTube link. You will need API keys for the AI services, Google and YouTube OAuth, and FFmpeg installed on the n8n host. Expect one run to replace hours of editing with a repeatable system managed from a spreadsheet. Ideal for daily quotes, quick tips, or listicle shorts driven by your sheet.
13 views
view
n8n
Marketing
Automate Google Drive Resume Q&A
Turn a resume in Google Drive into a smart chat that answers questions and sends a daily email report. Ideal for personal sites, career pages, or portfolios that want simple Q&A and clear insights without manual updates. When a file is added or changed in a chosen Google Drive folder, the text is split into chunks, embedded with Google Gemini, and stored in Pinecone. A public chat webhook lets visitors ask questions. The agent uses the vector store, a memory buffer, and the Gemini chat model to give grounded answers. A separate webhook can save conversation logs to NocoDB. Each day on schedule, the workflow pulls today’s conversations, groups them by session and email, formats them as HTML, and emails a summary from Gmail. Setup needs Google Drive, Gmail, Pinecone, Google Gemini, and NocoDB credentials in n8n. Expect less manual work, faster updates when the resume changes, and one clear email summary at the end of the day. Use it for personal branding, HR portfolios, or team pages that need quick, accurate answers based on the latest resume content.
60 views
view
n8n
Marketing
Sync WordPress to Google Drive Content Reports
Content teams often need a fresh list of live posts for reports and audits. This setup pulls all published posts from WordPress and saves a clean CSV file straight to Google Drive. It is ideal for marketers, editors, and agencies that want quick exports without copy and paste. Under the hood, a manual trigger starts the run. The workflow fetches all published posts from WordPress, then uses a field mapping step to keep only the columns you want, like id and title. Next it turns the result into a CSV file and uploads it to your chosen Google Drive folder using a service account. You get a consistent file that is ready for Google Sheets, with only live content included, and the same format every time. You will need WordPress access and a Google Drive account with a service account set up. Connect both in n8n, select the fields you care about in the Adjust Fields step, and click Test to generate your first export. Expect a ready file in minutes and a big cut in manual work. This is great for monthly content reviews, SEO audits, campaign summaries, and client deliverables.
11 views
view
See More Templates

These templates were sourced from publicly available materials across the web, including n8n’s official website, YouTube and public GitHub repositories. We have consolidated and categorized them for easy search and filtering, and supplemented them with links to integrations, step-by-step setup instructions, and personalized support in the Futurise community. Content in this library is provided for education, evaluation and internal use. Users are responsible for checking and complying with the license terms with the author of the templates before commercial use or redistribution.Where an original author was identified, attribution has been provided. Some templates did not include author information. If you know who created this template, please let us know so we can add the appropriate credit and reference link. If you are the author and would like this template removed from the library, email us at info@futurise.com and we will remove it promptly.