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
Automate UTM links with n8n and Google Analytics

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

Learn how to Build this Workflow with AI:

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.


Automate UTM links with n8n and Google Analytics

Visit through Desktop to Interact with the Workflow.

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.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.