TokPortal
Integration

TokPortal + n8n: Automate Account Creation and Video Posting

Build powerful automation workflows that create TikTok accounts, upload videos, and manage campaigns — all without writing code.

Vincent Tellenne

Vincent Tellenne

Founder & CEO

March 5, 202610 min read
TokPortal + n8n: Automate Account Creation and Video Posting
Share

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

1

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.

2

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.

3

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.

n8n-workflow.json
{
  "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.

video-post-workflow.json
{
  "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

Set up TokPortal webhooks in n8n to receive real-time notifications when accounts are created, videos are uploaded, or bundles change status. Add a Webhook trigger node in n8n, copy the webhook URL, and configure it in your TokPortal dashboard under Settings → Webhooks. This enables reactive workflows that respond instantly to events.

Ready to automate?

Connect TokPortal to n8n in minutes. Get your API key and start building automated TikTok workflows today.

Get API Key

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 PipelineChain OpenAI, Claude, or Gemini nodes to generate video captions, hashtags, and posting schedules automatically.
  • Cross-Platform SyndicationPost the same content to TikTok and Instagram simultaneously by triggering multiple TokPortal bundles from a single workflow.
  • Smart Scheduling with Timezone LogicUse n8n's date/time functions to calculate optimal posting times for each target country and schedule accordingly.
  • Error Handling & Retry LogicBuild fault-tolerant workflows with automatic retries, error notifications via Slack, and fallback strategies.
  • Performance-Based ScalingPull analytics from TokPortal, analyze engagement rates, and automatically create more accounts in top-performing regions.
  • Batch Operations at ScaleProcess 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?+
Yes. n8n is fully open-source under a fair-code license. You can self-host it on your own server for complete control over your data and workflows, or use n8n Cloud for a managed experience. Self-hosting is free and gives you unlimited workflow executions.
How do I handle API errors in my workflows?+
n8n includes robust error handling nodes. You can configure automatic retries with exponential backoff, send failure notifications to Slack or email, and set up fallback workflows. TokPortal's API also returns detailed error messages that n8n can parse and act on.
Can I scale to hundreds of accounts with n8n?+
Use n8n's Split In Batches node to process large volumes while respecting TokPortal's API rate limits. A typical workflow can handle 50-100 account creations per hour. For higher volumes, add a Wait node between batches or run parallel workflows across multiple n8n instances.
Share
Vincent Tellenne

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

Ready to launch?Start with TokPortal