Auto-publish scheduled TikTok videos from Airtable
Flip a row in Airtable to Ready to Publish and it goes live on TikTok, with the caption, hashtags, and privacy you picked, plus a Slack heads-up when it lands.
Build me a code workflow that publishes videos to TikTok from an Airtable content calendar.
Trigger: Airtable poll on a specific base and table, event type new or updated record. Only proceed when the row's Status field equals Ready to Publish. Assume the row has these columns: Video (an Airtable attachment, one video file, Airtable exposes it as a public URL on the attachment), Caption (single-line text), Hashtags (single-line or multi-select), Privacy Level (single-select with values like PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY), Status (single-select), Publish ID (text), Publish URL (URL), and Error (long text).
Steps, in order, deterministic and code-based (no LLM decisions):
1) Call TikTok Query Creator Info to read the connected creator's currently allowed privacy levels and whether they can post right now. If the row's Privacy Level is not in the allowed list, coerce it to the safest allowed level (prefer SELF_ONLY when in doubt) and note the coercion in the Error field.
2) Call TikTok Direct Post Video using source PULL_FROM_URL. Pass the Airtable attachment URL as the video URL, the composed caption (Caption + a space + space-separated Hashtags with a # prefix on each, trimmed to TikTok's caption length), and the resolved privacy level from step 1. Capture the publish_id.
3) Poll TikTok Fetch Publish Status by publish_id. Poll on a short interval (a few seconds) with a reasonable max wait (a few minutes). Stop on PUBLISH_COMPLETE, or on any terminal failure status the API returns.
4) Call Airtable Update Record on the same row: on success set Status to Published and write the publish_id (and the returned public post URL if available) back to Publish ID and Publish URL; on failure set Status to Failed and write the TikTok error code and message to the Error field. Always write the publish_id even on failure so we can debug.
5) Only on success, call Slack Send a Message to a configured channel with a short note like "Published to TikTok: <first 80 chars of caption>… (link)". Skip the Slack ping on any failure path.
Error handling: if TikTok returns spam_risk_too_many_posts or rate_limit_exceeded, do not retry inside the workflow. Write the error code to the Airtable Error field, set Status to Failed, and skip the Slack success ping so we don't spam the channel. If access_token_invalid comes back, fail the run loudly so the owner reconnects TikTok.
Config inputs I want to be able to set: the Airtable base id, the Airtable table name, the Status value that triggers publishing (default Ready to Publish), the Slack channel id for confirmations, and a fallback Privacy Level to use when the row doesn't specify one.
Keep it deterministic. No agent, no reasoning steps. One row in, one publish attempt out, one row update, one optional Slack ping.
Additional information
What does this prompt do?
- Watches your Airtable content calendar and picks up any row you mark Ready to Publish.
- Sends the video to TikTok with your caption, hashtags, and chosen privacy level, then waits for the post to actually go live.
- Writes the outcome back to the row (Published or Failed, plus a link and any error message) so your calendar always tells the truth.
- Drops a short confirmation in the Slack channel of your choice when a video successfully publishes.
What do I need to use this?
- An Airtable base with a content calendar table that has a video attachment, a caption, hashtags, a privacy setting, and a Status field.
- A TikTok account you can log in to and post from.
- A Slack workspace and the channel you want confirmations posted to.
How can I customize it?
- Change which Status value triggers publishing (for example, Approved instead of Ready to Publish).
- Swap which Slack channel gets the confirmation, or turn the Slack ping off entirely.
- Adjust the caption template, hashtag formatting, or which privacy level is used when none is set on the row.
Frequently asked questions
Do I need a business TikTok account?
Does the video need to be uploaded somewhere first?
What happens if TikTok rejects the post?
Can I schedule videos ahead of time?
Will this handle TikTok's daily posting limits?
Related templates
Stop babysitting your TikTok upload queue.
Connect Airtable, TikTok, and Slack once, and Geni takes every Ready to Publish row from calendar to live post to Slack confirmation.