name: tiktok-post description: Upload and publish a video (or image carousel) to TikTok using the browser. Handles caption, hashtags, cover selection, and privacy settings. metadata: openclaw: emoji: 🎵
TikTok 发布技能
Use this skill when:
- The user wants to publish a video to TikTok (国际版)
- You need to cross-post a short video generated by video-producer
- You need to set caption, hashtags, and cover for a TikTok post
Prerequisites: Browser session must be logged in to tiktok.com.
通用约束
- 文件上传前必须先复制到
/tmp/openclaw/uploads/(browser 工具沙箱限制) browser upload工具可能返回「超时错误」,但这不代表上传失败!上传后用 snapshot 检查页面状态(进度条、处理状态文字)- 不要通过检查
input.files.length是否为 0 判定上传是否失败!input.files.length == 0不代表上传失败。 - 遇到
browser failed: timed out. Restart the OpenClaw gateway ...错误时,不需要重启、不需要报错!等待 30 秒后在原页面继续操作即可。若仍无法操作,再等 30 秒;若还不行,尝试关闭浏览器后重开;只有关闭重开后仍报错才是真的出错,需停止并反馈用户。 - Caption 输入使用
type+slowly: true,不要用fill()
Cookie Warmup
Navigate to https://www.tiktok.com first. If it redirects to login, the session has expired — inform the user.
Workflow: Upload Video
1. Navigate to https://www.tiktok.com/creator-center/upload
(fallback: https://www.tiktok.com/upload)
2. Wait for the upload page to load
3. Click "Select video" or drag-and-drop the video file into the upload zone
- Supported: MP4, MOV, WebM
- Recommended: 9:16 vertical, 1080×1920, under 500MB
- Duration: 15s – 10 minutes
4. Wait for upload and processing to finish (progress bar reaches 100%)
5. Click into the caption area and type the caption:
- Plain text + hashtags (use #tag format)
- Max 2200 characters
- Include 3–5 relevant hashtags for discoverability
6. Set cover image:
- Click "Cover" and select a frame from the video
- Or upload a custom cover image
7. Click "Post" button
8. Wait for confirmation — TikTok shows "Your video has been posted" or similar
9. Copy and report the post URL
Workflow: Schedule Post (if available)
After step 6 above:
1. Toggle "Schedule" instead of posting immediately
2. Select date and time (timezone auto-detected from account settings)
3. Click "Schedule"
Caption Best Practices
- Lead with a hook in the first line (shown in feed before "more" truncation)
- Add hashtags at the end, not inline
- Use a mix of broad tags (#ai #technology) and niche tags (#aitools #wiseflow)
- Keep core message under 100 characters before hashtags
Error Handling
| Situation | Action |
|---|---|
| Login page | Session expired — inform user to re-login |
| Video rejected (policy violation) | Report reason to user; do not retry automatically |
| Upload stuck at % | Wait up to 3 minutes; refresh page if still stuck |
| Caption too long | Trim hashtags first, then caption |
| Cover selection fails | Skip cover customization and use auto-generated cover |
Notes
- TikTok's upload UI changes frequently — if a button/element is not found, look for equivalent UI based on intent
- Always confirm post URL after completion
- Do NOT post content that violates TikTok Community Guidelines