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.

3 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

the token refresh part is what I’d watch long term. log both access and refresh expiry dates somewhere visible, then alert before the refresh stops working. otherwise this can look healthy for weeks and quietly die

for downloading, yt-dlp is fine self hosted but it becomes maintenance. a paid API is boring, but that’s not a bad thing for the step that only needs to fetch the file

after publishing, poll for the final status and save the post ID + live URL so a retry can’t create a duplicate. blotato can handle that tiktok publishing handoff through n8n without you managing each social token directly. your rss and dedup logic can stay as it is

repurposing shorts into tiktok posts is exactly the kind of workflow that gets messy fast if you’re doing the download and reupload dance manually.

- pull the source video with the youtube api or an rss trigger in n8n so new shorts fire the workflow automatically

- store the raw file in airtable or a bucket so you have a record before republishing anywhere

- push the actual multi-platform publish step to blotato, it handles the tiktok formatting and caption rewrite so you’re not maintaining separate upload logic per platform

- log the result back into n8n so failed publishes retry instead of silently dropping

this stack keeps the pipeline hands off after the first upload. what part of your current flow keeps breaking, the fetch or the publish step?

Great workflow!:smiling_face_with_three_hearts:

Nice build. Refreshing the TikTok token on every run is the right call, those access tokens expire too fast to store.

One thing I’d add: save the publish_id from the init call and poll the status endpoint until it reports the post as complete before you write the short_id to the Data Table. Otherwise a failed upload gets marked as done and never retries.

On the download question: if it’s your own channel, the cleanest source is usually your original export (a Drive or Dropbox folder trigger) instead of pulling the file back off YouTube. You skip the RapidAPI step and keep full quality.

I built PostOnce.to, which does this YouTube Shorts to TikTok crosspost (and the other direction) without managing tokens yourself, for anyone who wants a no-code version. For people who like owning the pipeline, this template is a great starting point.