This workflow automates TikTok for Business API tasks, replacing manual campaign management and analytics retrieval via TikTok’s Business Center, which is time-intensive and prone to errors due to frequent token expirations (1-hour access tokens). It handles OAuth2 authentication, token refresh (60-day refresh tokens), campaign retrieval, and analytics reporting. Key nodes include Manual Trigger for testing, Set for input validation (client_id, client_secret, refresh_token, advertiser_id), IF for credential and token checks, HTTP Request for token refresh, campaign, and analytics retrieval, and Set for success/error responses. Supports operations like refresh_token, get_campaigns, and get_analytics. Ideal for marketing teams managing 5+ TikTok campaigns, it streamlines ad performance tracking and optimization, reducing manual effort and ensuring uninterrupted API access.\n\nSaves 4-8 hours weekly automating 5+ campaign reports or token refreshes, cutting downtime by 85%. Suits small to medium marketing agencies or e-commerce brands. Requires TikTok Business App (free) and n8n cloud ($20/month) or self-hosted (free). Scalable to 50+ campaigns but limited by TikTok’s API rate limits (10,000 calls/day). No webhook needed unless replacing trigger.\n\nInstall n8n from n8n.io or cloud.n8n.io ($20/month unlimited). Create a TikTok Business App at business.tiktok.com, get client_id, client_secret, and initial refresh_token via OAuth flow (see https://business-api.tiktok.com/portal/docs?id=1738455508553729). Set TIKTOK_CLIENT_ID, TIKTOK_CLIENT_SECRET, TIKTOK_REFRESH_TOKEN, TIKTOK_ADVERTISER_ID, TIKTOK_TOKEN_EXPIRES_AT in n8n environment variables. Configure HTTP Request for token refresh and API calls. For Webhook, add Webhook node, set path to ‘tiktok’, and use URL (e.g., https://your-n8n/webhook/tiktok123).\n\nTest manually: Run with operation=’get_campaigns’, verify campaign data in Operation Success. Common errors: invalid refresh_token (re-authenticate via TikTok OAuth), missing advertiser_id (check Business Center), or rate limits (add Wait node, 1s delay). Deploy by activating; monitor logs. Maintain by storing tokens in a database, scheduling hourly token checks, and adjusting page_size for large campaigns.", "businessValue": "Saves 4-8 hours/week automating TikTok campaign management and analytics", "setupTime": "25-35 minutes", "difficulty": "Intermediate", "requirements": ["TikTok Business App (free, with client_id and client_secret)", "Valid refresh token and advertiser ID", "n8n cloud ($20/month) or self-hosted (free)"], "useCase": "Automating TikTok ad campaign monitoring and performance analytics"
$5.49
Workflow steps: 16
Integrated apps: manualTrigger, set, if