Check Campaign Links for Complete and Consistent UTM Parameters
Missing or duplicate UTM parameters in campaign links often lead to inaccurate tracking data and complicate analysis. This workflow automatically checks all submitted links for essential UTM parameters (utm_source, utm_medium, utm_campaign) and identifies duplicates. Marketing teams, agencies, and campaign managers receive a secure webhook URL after import, which accepts lists of links, analyzes them, and returns a structured validation result as JSON. This minimizes errors and ensures higher data quality in campaign tracking.
Inaccurate UTM parameters and duplicate links can significantly impact campaign tracking. This workflow helps marketing teams and agencies automatically check their UTM links for completeness and duplicates. A provided webhook accepts lists of links via POST request. The workflow then verifies that the fields name, url, utm_source, utm_medium, and utm_campaign are correctly and fully filled out. It also detects if multiple links use identical UTM parameter combinations, which can lead to faulty tracking. The result is a structured JSON containing status, error messages, and an overview of all checked links. Setup is straightforward: import, call the test webhook, review the result, and move to production use. No data is stored outside of n8n, and no external access is required. This solution is especially suitable for anyone who regularly checks campaign links and aims to minimize sources of error. Usage is limited to the parameters shown in the example; individual adjustments are possible.
AI-generated image
Installation
1. Import the workflow into n8n.
2. Open the workflow and verify all nodes are correctly connected.
3. Start the test listener in the Webhook node and copy the displayed test URL.
4. Use a tool like Postman or curl to send a POST request to the test URL (Content-Type: application/json).
5. Use the example JSON provided (see usage notes).
6. Check the validation result.
7. After successful testing, activate/publish the workflow and use the production URL from the Webhook node.
8. Optionally: set up webhook authentication in n8n to prevent unauthorized access.
9. Configure retention and access to execution data in n8n according to data protection requirements.
Usage
1. Send a POST request with the following example JSON to the webhook URL:
```json
{
"links": [
{"name": "Newsletter", "url": "https://example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=herbst"},
{"name": "Facebook", "url": "https://example.com/?utm_source=facebook&utm_medium=social&utm_campaign=herbst"}
]
}
```
2. Expected response (status 200):
```json
{
"status": "success",
"checked": [
{"index":0,"name":"Newsletter","valid":true,"missing":[],"trackingKey":"newsletter|email|herbst"},
{"index":1,"name":"Facebook","valid":true,"missing":[],"trackingKey":"facebook|social|herbst"}
],
"invalidCount": 0,
"duplicateKeys": []
}
```
3. Error case (e.g., missing fields):
```json
{
"links": [
{"name": "", "url": "https://example.com/?utm_source=&utm_medium=email&utm_campaign=herbst"}
]
}
```
Response (status 200):
```json
{
"status": "needs_work",
"checked": [
{"index":0,"name":"","valid":false,"missing":["name","utm_source"],"trackingKey":"|email|herbst"}
],
"invalidCount": 1,
"duplicateKeys": []
}
```
4. Error case (empty or invalid array):
```json
{
"links": []
}
```
Response (status 200):
```json
{
"status": "needs_work",
"checked": [],
"invalidCount": 0,
"duplicateKeys": []
}
```
5. If UTM combinations are used multiple times, the field duplicateKeys is populated.
6. Webhook authentication should be enabled in n8n before production use.
7. Execution logs in n8n may store user data; configure retention and access as needed.
Required connections and APIs
API connections
No saved API credentials were detected in the workflow JSON. Still check webhooks, target systems, credentials, and data protection before activation.
Nodes
WebhookCodeRespond to Webhook
Isolated functional test passed
Optional isolated functional test
The isolated data flow was tested without external services or credentials.
✓ Standard case with complete dataChecks the complete standard flow with valid sample data.Isolated functional test passed✓ Variation or boundary caseChecks a valid variation or an important boundary case.Isolated functional test passed✓ Additional processing ruleChecks this workflow's additional business processing rule.Isolated functional test passed✓ Invalid or incomplete inputChecks that invalid or incomplete data is rejected safely.Isolated functional test passed✓ Empty inputChecks that an empty request receives a controlled response.Isolated functional test passed