Why Automate TikTok with n8n?
n8n is a powerful visual workflow automation tool that lets you connect APIs, apps, and services — without writing a single line of code. It's open-source, self-hostable, and trusted by thousands of companies worldwide to automate complex business processes.
When you connect n8n to the TokPortal API, you unlock the ability to automate your entire TikTok distribution pipeline. From creating accounts in target countries to scheduling video uploads across dozens of profiles, n8n handles the orchestration while TokPortal handles the execution on real devices.
Imagine triggering a new TikTok account creation every time a client signs up in your CRM, or automatically scheduling video uploads when new content lands in a Google Drive folder. With n8n + TokPortal, these workflows take minutes to build and run 24/7 without intervention.
5000+
Available nodes
Open Source
Self-hostable
10min
Setup time
24/7
Automated posting
Setting Up the Integration
Get your TokPortal API key
Log in to your TokPortal dashboard and navigate to Settings → API. Generate a new API key and copy it — you'll need this to authenticate requests from n8n. Keep this key secure and never share it publicly.
Add an HTTP Request node in n8n
In your n8n workflow editor, add an HTTP Request node. Set the method to POST, the URL to the TokPortal API endpoint (e.g., https://api.tokportal.com/v1/bundles), and add your API key as a Bearer token in the Authentication section.
Configure your workflow trigger and logic
Choose a trigger that fits your use case — a Schedule trigger for recurring tasks, a Webhook trigger for event-driven workflows, or an app trigger like Google Sheets for content-driven automation. Then chain TokPortal API calls to create bundles, configure accounts, upload videos, and publish.
Example: Auto-Create Accounts Workflow
This workflow demonstrates how to automatically create TikTok accounts via the TokPortal API whenever a new row is added to a Google Sheet. It's ideal for agencies managing multiple clients — each row in the spreadsheet represents a client request with country, username, and niche details.
The workflow reads the spreadsheet data, maps it to TokPortal's bundle creation endpoint, configures the account profile, and publishes the bundle. The entire process runs hands-free once configured, and you can monitor the results directly in your TokPortal dashboard.
{
"name": "TokPortal Auto-Create Accounts",
"nodes": [
{
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": { "interval": [{ "field": "hours", "hoursInterval": 1 }] }
}
},
{
"name": "Read Google Sheet",
"type": "n8n-nodes-base.googleSheets",
"parameters": {
"operation": "read",
"sheetId": "YOUR_SHEET_ID",
"range": "A:F"
}
},
{
"name": "Create TokPortal Bundle",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://api.tokportal.com/v1/bundles",
"authentication": "genericCredentialType",
"body": {
"bundle_type": "account_and_videos",
"platform": "tiktok",
"country": "={{ $json.country }}",
"videos_quantity": 10,
"title": "={{ $json.campaign_name }}"
}
}
}
]
}Example: Auto-Post Videos Workflow
Once your accounts are created, the next step is automating video uploads. This workflow monitors a cloud storage folder for new video files, then uses the TokPortal API to upload and schedule them across your accounts with optimized posting times.
The workflow handles video distribution intelligently — it rotates content across accounts, spaces out posting times to avoid detection patterns, and automatically adds captions and hashtags from a predefined template. You can customize the scheduling logic to match your content calendar.
{
"name": "TokPortal Video Auto-Post",
"nodes": [
{
"name": "Watch Folder",
"type": "n8n-nodes-base.googleDrive",
"parameters": {
"operation": "list",
"folderId": "YOUR_FOLDER_ID",
"filters": { "mimeType": "video/mp4" }
}
},
{
"name": "Configure Video",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://api.tokportal.com/v1/bundles/{{ $json.bundle_id }}/videos",
"body": {
"position": "={{ $json.position }}",
"video_type": "video",
"video_url": "={{ $json.download_url }}",
"description": "={{ $json.caption }}",
"target_publish_date": "={{ $json.scheduled_date }}"
}
}
},
{
"name": "Publish Video",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://api.tokportal.com/v1/bundles/{{ $json.bundle_id }}/videos/{{ $json.position }}/publish"
}
}
]
}Use webhooks for real-time updates
Ready to automate?
Connect TokPortal to n8n in minutes. Get your API key and start building automated TikTok workflows today.
Advanced Workflows
Once you've mastered the basics, n8n + TokPortal opens up a world of advanced automation possibilities. Combine AI content generation with automated posting to create a fully autonomous content pipeline — GPT-4 writes captions, DALL-E generates thumbnails, and TokPortal publishes across your account network.
You can also build schedule-triggered workflows that run daily content cycles: pull trending hashtags in the morning, generate UGC-style videos at noon, and schedule them for peak posting times in the evening. Add conditional logic to pause posting when engagement drops or scale up when a video goes viral.
For agencies, create multi-tenant workflows that manage client campaigns independently — each client gets their own Google Sheet for content input, their own TokPortal accounts, and automated performance reports delivered weekly via email.
- AI-Powered Content Pipeline — Chain OpenAI, Claude, or Gemini nodes to generate video captions, hashtags, and posting schedules automatically.
- Cross-Platform Syndication — Post the same content to TikTok and Instagram simultaneously by triggering multiple TokPortal bundles from a single workflow.
- Smart Scheduling with Timezone Logic — Use n8n's date/time functions to calculate optimal posting times for each target country and schedule accordingly.
- Error Handling & Retry Logic — Build fault-tolerant workflows with automatic retries, error notifications via Slack, and fallback strategies.
- Performance-Based Scaling — Pull analytics from TokPortal, analyze engagement rates, and automatically create more accounts in top-performing regions.
- Batch Operations at Scale — Process hundreds of videos in a single workflow run using n8n's split-in-batches node to respect API rate limits.
Is n8n free to use with TokPortal?+
How do I handle API errors in my workflows?+
Can I scale to hundreds of accounts with n8n?+

Written by
Vincent Tellenne
Founder & CEO
Vincent is the founder of TokPortal, building the infrastructure for scaled organic social media distribution. Previously scaled multiple startups and APIs to millions of requests.
Learn more about this topic with AI
Related Resources
Runway to TikTok at Scale: Geo-Native Workflow
Post Runway videos to TikTok at scale with real-device workflows across 20 countries, native sounds, webhooks, and API-controlled campaigns.
TokPortal + Zapier: No-Code Social Distribution
Use TokPortal + Zapier to send videos from 5,000+ apps into geo-native TikTok, Reels, and Shorts posting workflows without custom code in 2026.
Zapier Workflow: AI UGC From Drive to TikTok
Build a Zapier workflow that posts AI UGC from Google Drive to TikTok via TokPortal real-device routing across 20 countries, with Sheets logging.
Automate TikTok Posting with n8n + Real Devices
Automate TikTok posting with n8n and TokPortal real devices across 20 countries using webhooks, schedules, retries, and API workflows.
Distribute Pika.ai Videos to TikTok, IG, YouTube
Move Pika videos to TikTok, Reels, and Shorts through real devices, APIs, and local accounts in 20+ countries—without manual upload queues.
Automate Runway Videos to TikTok
Automate Runway clips to TikTok with TokPortal API workflows across real devices in 20+ countries for agencies, AI tools, and growth teams.
