JSPM

@yaring/n8n-nodes-tiktok-v1

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q49347F
  • License MIT

TikTok API integration for n8n - upload videos, get analytics and manage content

Package Exports

  • @yaring/n8n-nodes-tiktok-v1
  • @yaring/n8n-nodes-tiktok-v1/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@yaring/n8n-nodes-tiktok-v1) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

n8n-nodes-tiktok

This is an n8n community node that integrates with TikTok API. It allows you to upload videos, get user statistics, and retrieve detailed analytics in your n8n workflows.

TikTok is the leading short-form video hosting service with over 1 billion monthly active users worldwide. This node provides comprehensive access to TikTok's Content Posting API, Display API, and user information endpoints.

n8n is a fair-code licensed workflow automation platform.

Table of Contents

Installation

Follow the installation guide in the n8n community nodes documentation.

You can install this node via the n8n community package manager:

npm install n8n-nodes-tiktok

Operations

Video Resource

  • Upload: Upload videos to TikTok (inbox or direct post)
  • Publish: Publish uploaded videos from inbox with metadata
  • List: Get list of user's videos with pagination
  • Get Status: Check upload/publish status of videos

User Resource

  • Get Profile: Retrieve user profile information (username, avatar, bio, etc.)
  • Get Stats: Get user statistics (followers, following, likes, video count)

Analytics Resource

  • Get Video Analytics: Detailed analytics for specific videos (views, likes, comments, shares)
  • Get Performance Metrics: Overall performance metrics for the user account

Credentials

This node uses TikTok OAuth2 API credentials. To set up:

Prerequisites

  1. Create a TikTok Developer account at developers.tiktok.com
  2. Register your application and get approval from TikTok
  3. Configure redirect URIs for your application

Required Scopes

The following scopes are required for full functionality:

  • user.info.basic - Basic user information
  • user.info.profile - User profile details
  • user.info.stats - User statistics
  • video.list - List user videos
  • video.upload - Upload videos
  • video.publish - Direct post (requires additional TikTok approval)

Setup Steps

  1. In n8n, go to CredentialsAdd CredentialTikTok OAuth2 API
  2. Enter your Client ID and Client Secret from TikTok Developer Console
  3. Configure the Scope field (default includes all common scopes)
  4. Complete the OAuth authorization flow

Important Notes

  • Access tokens expire every 24 hours but are automatically refreshed
  • Direct Post functionality requires additional approval from TikTok
  • Inbox uploads allow users to edit content before publishing manually

Compatibility

  • Minimum n8n version: 0.198.0
  • Tested with n8n versions: 0.198.0+
  • Node version: Requires Node.js 20.15+

Usage Examples

Example 1: Upload Video to TikTok

{
  "resource": "video",
  "operation": "upload",
  "videoUrl": "https://example.com/my-video.mp4",
  "uploadType": "inbox",
  "title": "My Amazing Video",
  "description": "Check out this cool video! #trending #viral",
  "privacy": "PUBLIC_TO_EVERYONE"
}

Example 2: Get User Statistics

{
  "resource": "user",
  "operation": "getStats",
  "statsFields": ["follower_count", "following_count", "likes_count", "video_count"]
}

Example 3: Get Video Analytics

{
  "resource": "analytics",
  "operation": "getVideoAnalytics",
  "videoIds": ["7034682002927550598", "7035783003928561699"],
  "analyticsFields": ["id", "title", "view_count", "like_count", "comment_count", "share_count"]
}

Example Workflow: Auto-Upload with Analytics Tracking

  1. HTTP Request → Fetch video from your content system
  2. TikTok (Upload) → Upload video to TikTok inbox
  3. Wait → Wait for processing (2-3 minutes)
  4. TikTok (Get Status) → Check upload status
  5. TikTok (Analytics) → Track performance after 24 hours

API Limitations

  • Video upload: Max 20 videos per request for analytics
  • File size: Follow TikTok's video requirements (typically up to 500MB)
  • Rate limits: Respect TikTok's API rate limits
  • Processing time: Videos take 30 seconds to 2 minutes to process

TikTok Requirements

Domain Verification

For pull URL uploads, you must verify domain ownership with TikTok by:

  • Adding DNS TXT records, or
  • Uploading a verification file to your domain

App Review Process

To use Direct Post functionality:

  1. Your app must be intended for public use (not internal/private)
  2. Submit detailed app review documentation
  3. Provide demo videos showing complete integration flow
  4. Wait 1-2 weeks for approval

Common Issues & Troubleshooting

Upload Errors

  • Invalid video URL: Ensure the video URL is publicly accessible
  • Domain not verified: Complete TikTok's domain verification process
  • File format: Use supported formats (MP4, MOV, WEBM)

Authentication Issues

  • Token expired: Tokens are automatically refreshed every 24 hours
  • Insufficient scopes: Ensure all required scopes are approved
  • App not approved: Some features require TikTok app approval

Processing Delays

  • Videos typically process within 2 minutes
  • Use the "Get Status" operation to monitor progress
  • Status will change from PROCESSING_UPLOAD to PUBLISH_COMPLETE

Resources

Support

For issues related to:

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.