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-tiktokOperations
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
- Create a TikTok Developer account at developers.tiktok.com
- Register your application and get approval from TikTok
- Configure redirect URIs for your application
Required Scopes
The following scopes are required for full functionality:
user.info.basic- Basic user informationuser.info.profile- User profile detailsuser.info.stats- User statisticsvideo.list- List user videosvideo.upload- Upload videosvideo.publish- Direct post (requires additional TikTok approval)
Setup Steps
- In n8n, go to Credentials → Add Credential → TikTok OAuth2 API
- Enter your Client ID and Client Secret from TikTok Developer Console
- Configure the Scope field (default includes all common scopes)
- 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
- HTTP Request → Fetch video from your content system
- TikTok (Upload) → Upload video to TikTok inbox
- Wait → Wait for processing (2-3 minutes)
- TikTok (Get Status) → Check upload status
- 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:
- Your app must be intended for public use (not internal/private)
- Submit detailed app review documentation
- Provide demo videos showing complete integration flow
- 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_UPLOADtoPUBLISH_COMPLETE
Resources
- TikTok Developer Documentation
- TikTok API Reference
- n8n Community Nodes Documentation
- OAuth 2.0 Authorization Guide
Support
For issues related to:
- This n8n node: Open an issue on GitHub
- TikTok API: Contact TikTok Developer Support
- n8n platform: Visit n8n Community
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.