Automate TikTok Posting with n8n & TokPortal API
Post TikTok videos in any country on autopilot using n8n and the TokPortal API. No code required — just connect the nodes, drop your videos, and let the workflow handle account creation, scheduling, and publishing.
What you'll build
A fully automated pipeline that:
- Creates geo-targeted TikTok accounts in the US, UK, or any of 16+ countries
- Uploads your videos from Google Drive or a folder
- Schedules posts at optimal local times
- Publishes everything with one trigger
Time to set up: ~15 minutes.
Prerequisites
- A TokPortal account with credits
- An API key (starts with
tok_live_) - n8n installed (self-hosted or n8n cloud)
Step 1: Create the TokPortal HTTP credential
In n8n, go to Credentials → New → HTTP Request (Header Auth):
| Field | Value |
|---|---|
| Name | TokPortal API |
| Header Name | X-API-Key |
| Header Value | tok_live_your_key_here |
Step 2: Create a bundle via HTTP Request node
Add an HTTP Request node with:
{
"method": "POST",
"url": "https://app.tokportal.com/api/ext/bundles",
"headers": {
"Content-Type": "application/json"
},
"body": {
"bundle_type": "account_and_videos",
"platform": "tiktok",
"country": "USA",
"title": "n8n Automated Bundle",
"videos_quantity": 10
}
}
The response returns a bundle_id — store it in a variable for the next nodes.
Cost: 35 credits (25 for the account + 10 × 2 for video slots).
Step 3: Configure the account
Add another HTTP Request node:
{
"method": "PUT",
"url": "https://app.tokportal.com/api/ext/bundles/{{$json.data.id}}/account",
"body": {
"username": "mybrand_us",
"visible_name": "My Brand",
"biography": "Official US account. Fashion & lifestyle."
}
}
Step 4: Upload and configure videos
For each video, chain two nodes:
Node A — Get upload URL:
{
"method": "POST",
"url": "https://app.tokportal.com/api/ext/upload/video",
"body": {
"filename": "video_1.mp4",
"bundle_id": "{{bundle_id}}"
}
}
Node B — Configure the video slot:
{
"method": "PUT",
"url": "https://app.tokportal.com/api/ext/bundles/{{bundle_id}}/videos/1",
"body": {
"video_type": "video",
"description": "This trend is insane 🔥 #fashion #style",
"target_publish_date": "2026-03-15",
"video_url": "{{upload_public_url}}"
}
}
Use n8n's Loop Over Items or Split In Batches node to process multiple videos.
Step 5: Publish
Final HTTP Request node:
POST https://app.tokportal.com/api/ext/bundles/{{bundle_id}}/publish
That's it. A TokPortal account manager in the target country picks it up, creates the account on a real local device, and posts your videos on schedule.
Trigger ideas
| Trigger | Use case |
|---|---|
| Schedule (daily/weekly) | Recurring content drops |
| Google Sheets row added | Team adds video URLs to a sheet |
| Webhook | Your CMS publishes a new post |
| RSS Feed | Repurpose blog content as TikTok videos |
Scaling up: multi-country campaigns
Use the bulk creation endpoint to create accounts across multiple countries in one call:
{
"method": "POST",
"url": "https://app.tokportal.com/api/ext/bundles/bulk",
"body": {
"platforms": ["tiktok"],
"countries": ["USA", "GBR", "DEU", "FRA"],
"accounts_count": 1,
"videos_per_account": 10,
"title": "Multi-country launch"
}
}
4 accounts × 10 videos = 40 localized posts across 4 countries, all from one n8n workflow.
What's next
- API Overview — Full endpoint reference
- CSV Import — Bulk-import videos from a spreadsheet
- Analytics — Track account performance via API
- MCP Server — Use TokPortal from Cursor or Claude Desktop