π± Turn TikTok videos into Facebook posts using WayinVideo and GPT-4o-mini
β‘ 75 views Β· π± Social Media & Email Marketing
π‘ Pro Tip β Since TikTok doesnβt have a public API, getting data usually means fragile HTTP scraping. ScraperNode is a community node that gives you clean JSON for TikTok profiles, videos, and comments β drop it into your workflow and skip the parsing.
Description
Description
Paste any TikTok, YouTube, or short-form video URL into a simple form along with your brand name, target audience, and preferred tone and the workflow automatically transcribes the content and writes a ready-to-publish Facebook caption. GPT-4o-mini follows ten Facebook engagement rules to write a hook, short paragraphs, a call to action, and up to 8 hashtags β then posts the caption directly to your Facebook Page feed via the Graph API. Every post is logged to Google Sheets with the Post ID, Post URL, character count, and Posted status. Built for social media managers, content creators, and brands who produce short-form video and want Facebook posts published automatically without rewriting captions manually.
What This Workflow Does
- Transcribes any video into plain text β WayinVideo processes the video and returns a clean spoken text version that GPT uses as the source for caption writing
- Writes a Facebook caption following 10 engagement rules β GPT-4o-mini produces a hook, short paragraphs, a tone-matched body, a CTA, optional video link, and up to 8 hashtags
- Optionally includes the video link in the post β If you choose Yes at form submission, the video URL is added naturally to the end of the caption
- Posts directly to the Facebook Page feed β The caption and hashtags are published via the Facebook Graph API without any manual copy-pasting
- Polls automatically until transcription is ready β Waits 60 seconds then checks every 30 seconds until the transcript is available, with no manual monitoring required
- Logs every post to Google Sheets β Appends a row with the video URL, title, brand name, caption, hashtags, character count, Post ID, constructed Post URL, Status, and Posted On timestamp
Setup Requirements
Tools Needed
- n8n instance (self-hosted or cloud)
- WayinVideo account with API access
- OpenAI account with GPT-4o-mini API access
- Facebook Developer account with a Page Access Token
- Google Sheets (one sheet with a tab named Facebook Posts)
Credentials Required
- WayinVideo API key (pasted into 2. WayinVideo β Submit Transcription and 4. WayinVideo β Get Transcript Results)
- OpenAI API key
- Facebook Page ID and Facebook Page Access Token (pasted into 11. HTTP β Post to Facebook)
- Google Sheets OAuth2
> β οΈ WayinVideo API key appears in 2 steps β replace YOUR_WAYINVIDEO_API_KEY in both 2. WayinVideo β Submit Transcription and 4. WayinVideo β Get Transcript Results. Missing either one will cause the workflow to fail.
Estimated Setup Time: 20β25 minutes
Step-by-Step Setup
-
Import the workflow β Open n8n β Workflows β Import from JSON β paste the workflow JSON β click Import
-
Get your WayinVideo API key β Log in to your WayinVideo account β go to Account Settings β copy your API key
-
Add your WayinVideo API key to node 2 β Open node 2. WayinVideo β Submit Transcription β find the
Authorizationheader valueBearer YOUR_WAYINVIDEO_API_KEYβ replaceYOUR_WAYINVIDEO_API_KEYwith your actual key -
Add your WayinVideo API key to node 4 β Open node 4. WayinVideo β Get Transcript Results β find the same
Authorizationheader β replaceYOUR_WAYINVIDEO_API_KEYwith the same key -
Connect OpenAI β Open node 9. OpenAI β GPT-4o-mini Model β click the credential dropdown β add your OpenAI API key β test the connection
-
Get your Facebook Page ID β Go to your Facebook Page β click About β scroll to Page Transparency β copy the Page ID number
-
Get your Facebook Page Access Token β Go to developers.facebook.com β My Apps β your app β Graph API Explorer β select your Page from the dropdown β click Generate Access Token β copy the token. Make sure the token has
pages_manage_postsandpages_read_engagementpermissions -
Add your Facebook credentials to node 11 β Open node 11. HTTP β Post to Facebook β in the URL, replace
YOUR_FACEBOOK_PAGE_IDwith your actual Page ID β in the JSON body, replaceYOUR_FACEBOOK_PAGE_ACCESS_TOKENwith your actual Page Access Token -
Create your Google Sheet tab β Open your Google Sheet β add a tab named exactly Facebook Posts β add these 10 column headers in row 1:
Video URL,Video Title,Brand / Page,Facebook Caption,Hashtags,Character Count,Post ID,Post URL,Status,Posted On -
Connect Google Sheets β Open node 12. Google Sheets β Log Post β click the document field β replace
YOUR_GOOGLE_SHEET_IDby selecting your spreadsheet or entering the Sheet ID (the string between/d/and/editin your Sheet URL) β click the credential dropdown β add Google Sheets OAuth2 β authorize access -
Activate the workflow β Toggle the workflow to Active β copy the Form URL from node 1. Form β Video URL + Details β open it in a browser to submit your first video
How It Works (Step by Step)
Step 1 β Form: Video URL + Details You open the form URL in a browser and fill in six fields: the video URL (TikTok, YouTube, Vimeo, or any direct link), the video title, your brand or page name, the target audience, the post tone (e.g. inspiring, informative, funny), and whether to include the video link in the post (Yes or No). Submitting the form starts the workflow.
Step 2 β HTTP: WayinVideo β Submit Transcription The video URL is sent to the WayinVideo transcription API with the target language set to English. WayinVideo accepts the job and returns a task ID confirming transcription has started.
Step 3 β Wait: 60 Seconds The workflow pauses for 60 seconds before the first status check, giving WayinVideo time to begin processing the video.
Step 4 β HTTP: WayinVideo β Get Transcript Results A GET request checks the WayinVideo results endpoint using the task ID from step 2. It returns the current processing status and, once complete, the full transcript with speaker labels and timestamps.
Step 5 β IF: Transcription Complete?
This is the polling gate. If the status equals SUCCEEDED (YES path), the transcript is ready and the workflow moves forward to formatting. If still processing (NO path), the workflow routes to 6. Wait β 30 Seconds Retry which pauses 30 seconds then loops back to step 4 to check again. This repeats until SUCCEEDED.
Step 6 β Wait: 30 Seconds Retry When the transcript is not yet ready, the workflow waits 30 seconds then returns to step 4 for another check. The loop continues automatically.
Step 7 β Code: Format Transcript The transcript segments are formatted in two ways simultaneously: a speaker-labeled version with timestamps (for reference), and a clean plain text version that joins all spoken words into a single block of text. The plain text version is what GPT receives β this gives it the actual video content without speaker formatting distracting from the caption writing task. All six form inputs are also packaged here for the AI prompt.
Step 8 β AI Agent: Write Facebook Caption GPT-4o-mini receives the plain text transcript and a detailed system prompt. Ten Facebook writing rules are enforced: content only from the transcript, strong scroll-stopping hook in the first line, short 1β2 sentence paragraphs with line breaks, consistent tone, a CTA at the end, natural emojis, 150β300 word total length, optional video link if requested, and 5β8 relevant lowercase hashtags. The output uses three labeled sections: FACEBOOK CAPTION, HASHTAGS, and CHARACTER COUNT.
Step 9 β OpenAI: GPT-4o-mini Model This is the language model powering the caption writing. It runs with default settings for natural, engaging social copy.
Step 10 β Code: Parse Caption Output The AI output is parsed using regex to extract the FACEBOOK CAPTION, HASHTAGS, and CHARACTER COUNT sections individually. The full post message is assembled by joining the caption and hashtags with two line breaks. If the caption section is empty, the step throws a clear error. Video title, URL, brand name, and tone are also carried forward for the sheet log.
Step 11 β HTTP: Post to Facebook The full post message is sent to the Facebook Graph API v19 feed endpoint for your Page. The Graph API returns the new Post ID on success.
Step 12 β Google Sheets: Log Post
One row is appended to your Facebook Posts tab with all 10 columns populated: video URL, video title, brand name, caption, hashtags, character count, the Post ID returned by Facebook, a constructed Post URL (https://www.facebook.com/[post_id]), Status set to Posted, and the Posted On timestamp.
Key Features
β Plain text transcript for cleaner captions β The workflow strips speaker labels before sending to GPT so the AI focuses on the content, not the formatting β producing more natural Facebook copy β Ten Facebook engagement rules in the prompt β Hook structure, paragraph length, line breaks, emoji usage, CTA placement, word count, and hashtag count are all enforced in the system prompt β Optional video link included automatically β If you choose Yes at form submission, the video URL is woven into the post naturally β no manual adding or editing needed β Character count logged per post β Every row in Google Sheets includes the character count of the caption alone so you can track post length trends across your Page β Post URL constructed and logged β The Google Sheets log includes a direct link to every live Facebook post built from the Post ID β no searching for it in Facebook later β Tone matched per submission β You choose the tone at submission time so the same workflow can produce an inspiring post for one video and a funny casual post for another β Retry loop with 30-second intervals β The workflow polls on a sensible schedule without hammering the WayinVideo API while the transcript is processing
Customisation Options
Change the Facebook Graph API version β In node 11. HTTP β Post to Facebook, update the URL from v19.0 to the latest Graph API version (e.g. v23.0) if you need to use newer API features or if v19.0 is deprecated by the time you set this up.
Add a retry limit to stop infinite polling β Before node 6. Wait β 30 Seconds Retry, add a Set step that increments a counter, then add a second IF check to stop after 15 polls and send a Gmail error notification instead of looping indefinitely.
Post to multiple Facebook Pages in sequence β After node 12. Google Sheets β Log Post, duplicate the HTTP and Sheets steps with a second Page ID and Access Token β useful for agencies managing multiple brand pages from the same workflow.
Save a draft instead of posting immediately β In node 11. HTTP β Post to Facebook, add a "published": false field to the JSON body to save the post as a Facebook draft for review before it goes live β then update the Status in the sheet to βDraftβ accordingly.
Extend to Instagram simultaneously β After node 10. Code β Parse Caption Output, add a second HTTP step that posts the same caption to an Instagram Business Account via the Instagram Graph API β repurposing the same caption across both platforms in one workflow run.
Troubleshooting
WayinVideo returning an error on submission:
- Confirm
YOUR_WAYINVIDEO_API_KEYin node 2. WayinVideo β Submit Transcription is replaced with your actual API key β not the placeholder - Confirm the same replacement was made in node 4. WayinVideo β Get Transcript Results β both steps require the key
- Check the execution log of node 2 for the raw error β a 401 means wrong key, a 422 means the URL format is not supported
Workflow stuck in the retry loop:
- Check that the video URL is publicly accessible β TikTok videos that require login, private YouTube videos, or expired links will not be processed
- Open the execution log of node 4. WayinVideo β Get Transcript Results and check the raw response β WayinVideo may have returned FAILED with a specific error
- If the loop runs indefinitely, deactivate the workflow, fix the URL, and resubmit
Facebook post not publishing:
- Confirm
YOUR_FACEBOOK_PAGE_IDin the URL of node 11. HTTP β Post to Facebook is replaced with your numeric Page ID β not the page name or username - Confirm
YOUR_FACEBOOK_PAGE_ACCESS_TOKENin the JSON body of node 11 is replaced with a valid Page Access Token withpages_manage_postspermission - Page Access Tokens expire β if the workflow worked before and stopped, regenerate a long-lived Page Access Token from Graph API Explorer
- Check the execution log of node 11 for the Facebook API error β a 190 error means the token is expired or invalid
GPT not generating the caption or missing sections:
- Confirm the API key is connected in node 9. OpenAI β GPT-4o-mini Model and your account has available credits
- Check the execution log of node 8. AI Agent β Write Facebook Caption for the raw GPT output β if any of the three labeled sections are missing, the regex in node 10 returns empty strings
- If the transcript is very short (under 50 words), GPT may produce a minimal output β try a longer video or add more context in the video title field
Google Sheets not logging the row:
- Confirm
YOUR_GOOGLE_SHEET_IDin node 12. Google Sheets β Log Post is replaced with your actual sheet ID from the URL - Confirm the tab is named Facebook Posts exactly and all 10 column headers match exactly
- Check that the Google Sheets OAuth2 credential is connected and not expired β re-authorize if needed
Support
Need help setting this up or want a custom version built for your team or agency?
π§ Email:info@isawow.com π Website:https://isawow.com
π Nodes Used
Google Sheets, HTTP Request, AI Agent, OpenAI Chat Model, n8n Form Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File