Category: Automations › SEO, Analytics & Reporting · Best for: Campaign-heavy marketers · Platform: n8n · Steps: 11
What it does
Make tracking links and QR codes, and get reports on who clicked.
Create a marketing link with UTM parameters. Easily store in database and have QR code created and ready as well.
Works with: OpenAI, Memory Buffer Window, Google Analytics, Agent, Gmail, Airtable
What you get
- The n8n workflow file (
workflow.json), ready to import - This setup guide
- The list of fields to change for your own accounts (see Install below)
- Email support if you get stuck
Before you start
-
An n8n account. Easiest: n8n Cloud (free trial). Self-host for free with Docker:
docker run -it --rm -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n, then open http://localhost:5678. -
Accounts and API keys for these services:
- OpenAI API key: how to connect (used by OpenAI Chat Model1)
- Google (Sheets, Gmail, Drive, Calendar, Docs): how to connect (used by Google Analytics, Send Summary Report To Marketing Manager)
- Airtable personal access token: how to connect (used by Submit UTM Link To Database)
Install
- In n8n, click Create workflow (top right).
- Click the ⋯ menu → Import from file and choose
workflow.json. Or open the file, copy everything and paste it onto the empty canvas with Ctrl/Cmd + V. - Open each node with a red warning triangle and pick or create the matching credential from the list above.
- Point these fields at your own sheets, chats and accounts:
- Submit UTM Link To Database →
base: choose your own - Submit UTM Link To Database →
table: choose your own - Send Summary Report To Marketing Manager →
sendTo: choose your own
- Submit UTM Link To Database →
- Click Save.
Test it
- Click Test workflow (or Execute workflow). Schedule Google Analytics Report To Marketing Manager starts it. Trigger it once with real sample data.
- Click each node to check its output. A green tick means the step worked.
- Fix any red node: it's almost always a credential or a field that still points at a sheet or chat that isn't yours.
Go live
Toggle Active (top right). From now on it runs on its own. Check Executions in the left sidebar to see every run.
How it works, step by step
- Schedule Google Analytics Report To Marketing Manager starts the workflow (Schedule).
- Create UTM Link & Send To Database starts the workflow (Manual).
- OpenAI Chat Model1 uses AI (OpenAI).
- Window Buffer Memory uses AI (Memory Buffer Window).
- Google Analytics uses Google Analytics.
- Google Analytics Data Analysis Agent uses AI (Agent).
- Set UTM Parameters For Link reshapes the data for the next step.
- Send Summary Report To Marketing Manager uses Gmail.
- Create UTM Link With Parameters reshapes the data for the next step.
- Create QR Code With Submitted QR Link calls an external API (=https://quickchart.io/qr?text={{ $json.utmUrl }}&size=300&m).
- Submit UTM Link To Database uses Airtable to upsert.
Extra setup notes
These notes are also on the canvas as yellow sticky notes:
Create a marketing link with UTM parameters. Easily store in database and have QR code created and ready as well.
Type in requirements: website URL campaign id campaign source campaign medium campaign name campaign term
Code node creates the URL with UTM parameters.
It then sends to your Airtable database to store for records. It also creates a QR code with the embedded link to be used for materials.
Sample Airtable Setup: -Website Link UTM column
Schedule a Google Analytics Reports with Medium/Source to track UTM link performance. Update the reporting fields to fit your business needs. You can track traffic, conversions and other engagement metrics.
*Sample Google Report Metrics: Sessions. Update metrics as needed.
Troubleshooting
- "Credentials not found": open the node and select your credential again.
- Google "access blocked": in Google Cloud, add your email as a test user on the OAuth consent screen.
- Webhook not firing: copy the node's Production URL (not Test URL) into the other app, and make sure the workflow is Active.
- AI node errors: check your API key has billing enabled and the model name exists on your plan.
- Nothing happens on schedule: the workflow must be Active, and self-hosted n8n must stay running.
Need help?
Reply to your Morning Method order email and we'll help you get it running.
© Morning Method