Hey fellow n8n builders
,
I recently put together a workflow to automate cross-posting YouTube Shorts to TikTok. I wanted to share it here because dealing with the TikTok API’s OAuth flow and uploading binary video chunks was a fun challenge.
I relied heavily on native n8n features instead of third-party tools to keep it efficient.
Here is how the workflow is structured:
- Trigger: Polls a YouTube Shorts playlist RSS feed hourly.
- State Management: Uses n8n Data Tables to check if a short_id already exists, preventing duplicate uploads.
- Binary Handling: Uses an HTTP Request node to call a RapidAPI endpoint (YouTube Media Downloader) to fetch the actual MP4 file as binary data.
- Custom Authentication: Uses an HTTP Request node to automatically exchange a TikTok refresh_token for a fresh access_token on every run (bypassing the 24-hour expiration issue).
- TikTok API Upload: Initializes the video upload via the TikTok Content Posting API, routing it to either “Drafts” or “Direct Publish” based on a simple Config node.
You can grab the JSON and check out the template here:
https://n8n.io/workflows/16171
A couple of questions for the community:
- Has anyone found a reliable way to download YouTube videos natively in n8n without using a paid API like RapidAPI?
- For those who have worked with the TikTok API, do you have any tips on getting apps audited faster so I can unlock the “Public” privacy level?
I hope this template helps anyone looking to build video automation or struggling with the TikTok developer portal! Let me know if you have any feedback on how I structured the nodes.