Package Information
Documentation
n8n-nodes-tiktok-custom
Custom TikTok nodes for n8n - Upload videos, manage products, and more without usage limits!
Features
- š„ TikTok Upload: Upload videos with product anchors, captions, and scheduling
- šļø TikTok Products: Manage your TikTok Shop products and showcase
- š Session-based authentication: Use your own TikTok account without API limits
- š° Completely FREE: No credits, no subscriptions, unlimited usage
Installation
Option 1: Via n8n Community Nodes (Recommended - Easiest! āØ)
- Open your n8n instance
- Go to Settings ā Community Nodes
- Click Install a community node
- Enter:
n8n-nodes-tiktok-custom - Click Install
- Restart n8n
- Done! The nodes will appear in your node panel
Option 2: Manual Installation (For development)
Prerequisites
- n8n installed (self-hosted or Docker)
- Node.js and npm
- TypeScript compiler
Steps
Clone or download this repository
cd path/to/n8n-nodes-tiktok-customInstall dependencies
npm installBuild the project
npm run buildLink to your n8n installation
npm linkIn your n8n directory, link the package
cd /path/to/your/n8n npm link n8n-nodes-tiktok-customRestart n8n
n8n start
Option 3: Via npm (Direct)
cd ~/.n8n
npm install n8n-nodes-tiktok-custom
# Restart n8n
Getting TikTok Session Credentials
ā ļø IMPORTANT: This package uses session-based authentication from TikTok web. You need to extract cookies from your browser.
How to get your session cookies:
Login to TikTok
- Open https://www.tiktok.com in your browser
- Login to your account
Open DevTools
- Press
F12or right-click ā Inspect
- Press
Navigate to Cookies
- Go to
Applicationtab (Chrome) orStoragetab (Firefox) - Click on
Cookiesāhttps://www.tiktok.com
- Go to
Copy the required cookies:
- sessionid (required)
- msToken (required)
- odin_tt (optional, for some operations)
In n8n, create TikTok Session credentials
- Paste the cookie values
- Optionally customize User-Agent
ā ļø CRITICAL: Capturing Real TikTok Endpoints
The endpoints in this code are PLACEHOLDERS! Before using these nodes, you MUST capture the actual TikTok API endpoints using browser DevTools:
How to capture endpoints:
- Open TikTok web (https://www.tiktok.com)
- Open DevTools (F12) ā Network tab
- Filter by XHR/Fetch requests
- Perform the action you want to automate:
- For upload: Go to upload page, start uploading a video
- For products: Navigate to your shop/showcase
- Find the API requests in the Network tab
- Right-click on the request ā Copy as cURL
- Analyze:
- URL endpoint
- Request method (GET, POST, PUT)
- Headers
- Request body structure
- Update the code in the corresponding node file with the real endpoints
Example endpoints to capture:
Upload Video:
- Init:
POST /api/v1/web/project/create/ - Upload:
PUT <upload_url> - Publish:
POST /api/v1/item/create/
- Init:
Get Products:
GET /api/commerce/v1/creator/products
Product with Anchor:
POST /api/v1/item/create/withanchorsin body
Usage
TikTok Products Node
Get a list of products from your showcase:
{
"operation": "getProducts",
"count": 10,
"offset": 0
}
TikTok Upload Node
Upload a video with product anchor:
{
"videoSource": "binaryData",
"binaryProperty": "data",
"caption": "Check out this amazing product!",
"visibility": 0,
"allowComment": true,
"productAnchors": {
"anchor": [
{
"productId": "1234567890",
"displayName": "My Product"
}
]
}
}
Example Workflow
Replace your existing @dlir2404/n8n-nodes-tiktok workflow with:
- Manual Trigger or any trigger
- TikTok Products (Get Products) - Get your products
- HTTP Request - Download video
- TikTok Upload - Upload with product anchor
Limitations & Important Notes
ā ļø Session-based limitations:
- Cookies expire periodically - you'll need to refresh them
- TikTok may change their internal API without notice
- This is an unofficial method - use at your own risk
- Rate limiting may apply
ā ļø Endpoints:
- You MUST capture real endpoints from browser before use
- The code contains placeholder URLs that won't work without modification
Development
Project Structure
n8n-nodes-tiktok-custom/
āāā credentials/
ā āāā TikTokSession.credentials.ts
āāā nodes/
ā āāā TikTok/
ā āāā TikTokUpload.node.ts
ā āāā TikTokProducts.node.ts
āāā package.json
āāā tsconfig.json
āāā README.md
Build
npm run build
Watch mode (for development)
npm run dev
Troubleshooting
"Authentication failed" error
- Your session cookies have expired
- Re-extract cookies from browser and update credentials
"Rate limit exceeded"
- TikTok is temporarily blocking your requests
- Wait a few minutes before retrying
- Consider adding delays between operations
Node doesn't appear in n8n
- Make sure you ran
npm run build - Verify the link with
npm linkand in n8n directory - Restart n8n completely
- Check n8n logs for errors
Contributing
This is an educational project to demonstrate how to create custom n8n nodes. Feel free to:
- Capture and share real TikTok endpoints
- Add more operations (analytics, account management, etc.)
- Improve error handling
- Add tests
License
MIT
Disclaimer
This package is for educational purposes. It uses unofficial TikTok web APIs through session authentication. Use responsibly and in accordance with TikTok's Terms of Service.

