Adskeeper
Purpose
Section titled “Purpose”Prepare and send fully normalized campaign data to create campaigns on Adskeeper (or on MGid by changing credentials in n8n).
This workflow acts as a translation layer between human-readable inputs and strict API requirements.
Data Preparation
Section titled “Data Preparation”- Country normalization (“United States” -> “us”)
- Language ID mapping
- Browser slug mapping
- OS version expansion logic
- Geo JSON builder
Campaign Creation
Section titled “Campaign Creation”- Create campaign via API
- Controlled batch processing for teaser uploads
- Loop reset logic to prevent infinite recursion
- Structured form-urlencoded payload construction
Logging + Traceability
Section titled “Logging + Traceability”- Extract campaign ID
- Register control record in sheet
- Log phase-based errors
- Normalize API responses for readability
Diagram
Section titled “Diagram”flowchart TB
A[Google Sheets: campaign + teasers]
B[Normalization Layer]
C[Build structured payload]
D[Create campaign via API]
E[Split creatives into batches]
F[Upload teaser via API]
G{Error?}
L[Log normalized error]
H[Continue batch]
I[Register campaign ID in sheet]
A --> B
B --> C
C --> D
D --> E
E --> F
F --> G
G -->|Yes| L
G -->|No| H
H --> I
See the workflow in action
Section titled “See the workflow in action”Technical Highlights
Section titled “Technical Highlights”- Large OS version dictionary expansion
- Multi-language ID resolution
- Browser normalization logic
- JSON geo targeting builder
- Controlled execution flow
Business Impact
Section titled “Business Impact”- Minimizes API rejection errors
- Enables high-volume teaser uploads
- Standardizes targeting across networks
- Replicable to MGid with minimal structural changes