Automated YouTube Shorts to TikTok Publisher

Hey fellow n8n builders :waving_hand:,

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:
:backhand_index_pointing_right: https://n8n.io/workflows/16171

A couple of questions for the community:

  1. Has anyone found a reliable way to download YouTube videos natively in n8n without using a paid API like RapidAPI?
  2. 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.

2 Likes

Great workflow! The token refresh solution for TikTok is exactly the kind of thing that trips people up. On the YouTube download question — I haven’t found a reliable free alternative to RapidAPI either. If you’re self-hosted, yt-dlp via a Code node could work, but that’s not an option on cloud instances. Curious if anyone else has found something cleaner.

1 Like

The token refresh approach - pre-fetching the access_token on every run instead of storing it - is a solid pattern for TikTok’s short-lived tokens. On the YouTube download side: for self-hosted setups you can run yt-dlp as a sidecar container and call it via an Execute Command node or expose it as a small local HTTP endpoint, which removes the RapidAPI dependency entirely for the download step.

1 Like