Automate UTM Link Creation and Google Analytics Reports with n8n

This workflow automates the creation of UTM links with QR codes, stores them in Airtable, and schedules detailed Google Analytics reports. It solves the common problem of managing marketing campaign tracking and reporting efficiently.
lmChatOpenAi
googleAnalyticsTool
airtable
+9
Workflow Identifier: 1335
NODES in Use: lmChatOpenAi, memoryBufferWindow, googleAnalyticsTool, manualTrigger, set, code, airtable, httpRequest, scheduleTrigger, agent, gmail, stickyNote

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow creates UTM links from campaign info. It makes QR codes for those links. It saves all links in Airtable for easy tracking. It gathers Google Analytics data about the campaigns. Then it uses AI to write a report summary. Finally, it emails this summary to marketing teams to save time.

This process helps avoid errors like typos and lost data. It also speeds up report delivery and improves tracking accuracy.


Who Should Use This Workflow

This workflow is good for marketers who make many UTM links. It helps if you use offline and online ads. If you track campaigns in Airtable and email reports, this fits well. You need access to Google Analytics and OpenAI APIs.

It fits teams that want to save hours on manual tasks and avoid mistakes in link creation and reporting.


Tools and Services Used

  • n8n: Automates the whole workflow.
  • Airtable: Stores generated UTM links.
  • Google Analytics: Provides campaign traffic data.
  • QuickChart API: Creates QR codes from URLs.
  • OpenAI GPT-4o-mini: Analyzes data and creates report summaries.
  • Gmail OAuth2: Sends summary emails.

Inputs, Processing, and Outputs

Inputs

Processing Steps

  • Create UTM links from campaign data.
  • Generate QR codes from these links via the QuickChart service.
  • Store all UTM links in Airtable.
  • Set a schedule trigger to request Google Analytics session metrics filtered by source and medium.
  • Send the analytics data to the AI agent for report creation.
  • Email the AI-generated report summaries to stakeholders.

Outputs

  • Saved UTM links in Airtable for team use.
  • QR codes ready for print or sharing.
  • Regular email reports summarizing campaign data.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor, go to the workflow area.
  3. Choose “Import from File”, then select the downloaded workflow.

Step 2: Configure Credentials

  1. Attach the necessary API Keys and credentials for Airtable, Google Analytics, OpenAI, and Gmail.
  2. Make sure each credential is tested and active.

Step 3: Update IDs and Emails

  1. Open the Set node for UTM parameters to change campaign details if needed.
  2. Update the Google Analytics property ID in the analytics node.
  3. Edit the Gmail node to set recipient email addresses.

Step 4: Check Code and URLs

  1. Review the Code node to confirm the UTM link-building script is present.
  2. Verify the HTTP Request node uses the correct URL to generate QR codes.

Step 5: Run a Manual Test

  1. Trigger the workflow manually using the Manual Trigger node.
  2. Watch the workflow run, verify UTM URLs and QR codes are produced.
  3. Confirm data saved in Airtable.

Step 6: Activate for Production

  1. Enable the workflow in n8n so the schedule trigger runs automatically.
  2. Monitor the workflow regularly for errors or issues.
  3. Optionally use self-host n8n to run the workflow better on your own server.

Customizations

  • Change UTM parameter values in the Set node to fit your campaigns.
  • Modify Google Analytics metrics in the analytics node to track different data.
  • Adjust the schedule node’s interval to send reports daily, weekly, or monthly.
  • Customize QR code size and colors in the HTTP Request node to match your branding.
  • Add fields in Airtable node to save more campaign details like start date or notes.

Troubleshooting

Problem: “Invalid Airtable API Key or Access Denied”

Check the Airtable API Key in n8n credentials. Make sure the correct base and table are set. Confirm you have access rights in Airtable.

Problem: “Google Analytics Reports Return No Data”

Verify the Google Analytics property ID is correct. Check if data exists for chosen metrics and date range. Adjust filters if needed.

Problem: “QR Code Not Generated or Broken”

Test the QR code URL in a browser. Confirm the generated UTM link has valid characters. Fix URL parameters in the HTTP request node.


Pre-Production Checklist

  • Check all API credentials for Airtable, Google Analytics, OpenAI, and Gmail.
  • Run a manual trigger to generate UTM links and verify QR codes.
  • Confirm Airtable entries are saved correctly.
  • Test scheduled Google Analytics reporting and emails.
  • Back up Airtable base and workflow settings.

Summary

✓ Save hours by automating UTM link creation and QR code generation.

✓ Keep campaign tracking data organized in Airtable.

✓ Get timely Google Analytics report summaries via AI.

✓ Email marketing teams directly without manual report writing.

→ Prevent errors from manual entry and delays.

→ Get clearer insights faster for marketing decisions.


Frequently Asked Questions

Yes, replace the Airtable node with another supported database node like Google Sheets or MySQL and update the data mappings.
The workflow uses the GPT-4o-mini model which is cost-effective. The number of reports sent affects the total token usage.
All data uses API credentials stored securely in n8n. Access should be limited to trusted users.
Yes, it scales with Airtable capacity or by switching to a more scalable database.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free