TikTok Slideshow 内容创作自动化完全指南
使用 Claude Opus 4.7 + Pinterest + Node.js + Postiz 构建全自动内容流水线
当前 TikTok 正在大力推幻灯片(Slideshow)内容的曝光和互动。你可以看看这些频道。实际上,所有这些图片都来自 Pinterest(无尽的图片来源,无需使用 AI 生成,成本 = 0 美元,而且比 AI 生成的更容易走红)。
大多数创作者仍然在手动做内容:想创意 → 设计 → 逐个发布。既耗时又不稳定。下面这个工作流能帮你彻底解决问题。
完整工作流概览
[TikTok 刷屏] → [SnapTik 下载] → [Claude Opus 4.7 提取钩子]
↓
[Pinterest 选图] → [Node.js Canvas 脚本 → PNG 幻灯片]
↓
[Postiz Agent CLI → 排期/草稿]
↓
[TikTok App → 草稿箱 → 高峰时段点击发布]
钩子(Hook)是前 3 秒决定用户是否继续观看的关键。这是你最好的数据来源,直接来自你所在领域已经走红的视频。
第一步:从 TikTok 获取钩子灵感
有目的性地刷视频
打开 TikTok,搜索你所在领域的关键词(例如 "StudyTok"、"GymTok"、"BookTok"...)。按"最多点赞"或"最新"筛选,查看当前热门趋势。
观看时,注意以下要素:
- 第 1 张图片使用了什么文案/标题?
- 它是如何制造好奇心的?
- 它针对了什么痛点?
- 钩子是问题还是强烈陈述?
- 文案有多少字?
- 图片是什么风格?(极简/暗色/明亮/奢华)
下载视频用于分析
使用 SnapTik 或 SSSTik 下载无水印视频:
- 复制 TikTok 视频链接
- 粘贴到 SnapTik.app 或 SSSTik.io
- 下载无水印版本
- 本地保存,下一步上传到 Claude
这一步大多数人会跳过。与其猜测钩子,不如让 Claude Opus 4.7 分析已经走红的幻灯片模式。
第二步:用 Claude Opus 4.7 提取和分析钩子
提示词:从幻灯片提取钩子
将幻灯片图片(或 PDF/轮播图)上传到 Claude Opus 4.7,然后使用这个提示词:
Analyze this TikTok slideshow and:
1. Identify the main hook used in the first slide
(focus on text overlay, headline, and visual framing)
2. Explain why this hook works
(curiosity / pain point / surprise / relatability)
3. Break down the hook structure
(e.g., number + outcome, negative framing, identity targeting)
4. Write 5 similar hook variations for the niche [YOUR NICHE HERE]
- Each hook under 10 words
- Format: a question OR a strong statement
- Avoid generic openers like "Did you know"
Output as a numbered list, one hook per line.
如果只有幻灯片文字内容(没有图片)
如果你手动提取了幻灯片中的文字:
Here is the content of a viral TikTok slideshow in the niche [NICHE]:
[PASTE CONTENT HERE]
Task:
- Identify the core hook from the first slide
- Write 7 hook variations for a similar slideshow
- Each hook must trigger one of 3 emotions:
curiosity / FOMO / empathy
- Max 8 words per hook
- Include a short explanation of why each hook works
实际输出示例
对于个人理财领域,Claude 可能返回:
1. "I saved $5k in 6 months" → 好奇心("怎么做到的?")
2. "Most people spend before they save" → 痛点认同
3. "Stop doing this with your money" → 否定框架
4. "The 50/30/20 rule is outdated" → 反常识
5. "This one habit changed my finances" → 结果承诺
建立你的钩子库
将所有钩子保存到文件中。久而久之,你会建立起一个钩子数据库 → 内容创作更快 → 命中率更高。
额外福利:生成 Pinterest 搜索词
趁幻灯片还在 Claude Opus 4.7 中,运行这个提示词:
Based on this slideshow, suggest 10 Pinterest search queries
that match the visual style and content theme.
Focus on:
- Aesthetic keywords
- Composition (minimal, bold text, dark mode, etc.)
- Niche-specific visuals
Output as a list of short search phrases.
这让你在进入下一步时拥有精确的视觉方向,而不是盲目猜测。
或者,使用这个更详细的提示词:
Now look at the visual style of this slideshow:
1. Describe the color palette, lighting, and overall aesthetic
(dark/moody, bright/clean, luxury, minimal, etc.)
2. What kind of images would work as slideshow backgrounds
for the hooks you just wrote?
3. Give me 5 specific Pinterest search queries to find those images
- Format: short keyword phrases, 2-4 words each
- Optimized for Pinterest search, not Google
示例输出(个人理财幻灯片):
- dark aesthetic money desktop
- minimal finance flat lay
- luxury wealth background
- savings jar minimalist
- black and gold business
👉 直接复制这些到 Pinterest 搜索中,进入第三步。到这一步,Claude 已经给了你钩子和搜索词,直接去搜就行,不需要再想该搜什么。
第三步:从 Pinterest 获取图片
什么样的图片适合 TikTok
好的 TikTok 图片要素:
- 高分辨率:至少 1080×1080,最好是 1080×1920
- 深色或中性背景:文字叠加更清晰
- 少文字或无文字:避免与你的钩子文案冲突
- 氛围感强:极简、奢华、暗调或明亮干净
- 无品牌 Logo:避免版权问题
使用 Claude Opus 4.7 给出的搜索词
把 Claude Opus 4.7 给你的 5 个搜索词直接粘贴到 Pinterest 搜索框。每个搜索词针对特定的视觉风格,而不是宽泛的主题,所以结果更一致、更符合品牌调性。
如何下载 Pinterest 图片
方法 1:PinDown Chrome 扩展
安装 PinDown 扩展,一键下载图片。
方法 2:直接右键保存
右键点击图片 → "另存为"。
方法 3:Python 批量下载(全自动化方案)
# pinterest_downloader.py
import requests
from pathlib import Path
def download_image(url: str, filename: str, folder: str = "pinterest_images"):
Path(folder).mkdir(exist_ok=True)
response = requests.get(url, stream=True)
if response.status_code == 200:
with open(f"{folder}/{filename}.jpg", "wb") as f:
for chunk in response.iter_content(1024):
f.write(chunk)
print(f"Downloaded: {filename}")
# Paste direct image URLs from Pinterest
urls = [
"https://i.pinimg.com/originals/...", # URL 1
"https://i.pinimg.com/originals/...", # URL 2
]
for i, url in enumerate(urls):
download_image(url, f"image_{i+1:03d}")
按领域分类整理
pinterest_images/
├── finance/
├── fitness/
└── lifestyle/
第四步:用 Node.js 自动生成幻灯片
与其在 Canva 中手动设计,不如使用脚本以编程方式将钩子文字叠加到 Pinterest 图片上,自动导出为 1080×1920 的 PNG 文件。
安装依赖
mkdir tiktok-slide-gen && cd tiktok-slide-gen
npm init -y
npm install canvas @napi-rs/canvas sharp
幻灯片结构
第 1 张:钩子(HOOK) — 在最强的图片上叠加文字
第 2 张:问题/背景设定
第 3 张:要点 1
第 4 张:要点 2
第 5 张:要点 3
第 6 张:行动号召(CTA) — 关注、收藏、评论、下载
核心脚本:generate-slides.js
// generate-slides.js
import { createCanvas, loadImage, GlobalFonts } from '@napi-rs/canvas'
import { writeFileSync, mkdirSync } from 'fs'
import { join } from 'path'
// ─── 配置 ───────────────────────────────────────────────
const OUTPUT_DIR = './output'
const CANVAS_W = 1080
const CANVAS_H = 1920
const OVERLAY_OPACITY = 0.52 // 图片上的暗色遮罩透明度,0-1
const OVERLAY_COLOR = '0,0,0' // 遮罩 RGB 颜色
// 可选:加载自定义字体(TTF/OTF)
// GlobalFonts.registerFromPath('./fonts/Inter-Bold.ttf', 'InterBold')
// ─── 幻灯片定义 ────────────────────────────────────
// 每张幻灯片:{ imagePath, lines: [{ text, size, weight, y }] }
const slides = [
{
imagePath: './pinterest_images/finance/image_001.jpg',
lines: [
{ text: 'I saved $5k in 6 months', size: 88, weight: 'bold', y: 860 },
{ text: 'doing this one thing', size: 72, weight: 'normal', y: 970 },
],
},
{
imagePath: './pinterest_images/finance/image_002.jpg',
lines: [
{ text: 'Most people spend', size: 64, weight: 'normal', y: 820 },
{ text: 'before they save.', size: 64, weight: 'bold', y: 910 },
{ text: "Here's why that's a trap.", size: 56, weight: 'normal', y: 990 },
],
},
{
imagePath: './pinterest_images/finance/image_003.jpg',
lines: [
{ text: '01. Pay yourself first', size: 72, weight: 'bold', y: 900 },
{ text: 'Move 20% to savings on payday.', size: 52, weight: 'normal', y: 990 },
{ text: 'Before any expense hits.', size: 52, weight: 'normal', y: 1060 },
],
},
{
imagePath: './pinterest_images/finance/image_004.jpg',
lines: [
{ text: '02. Kill subscriptions', size: 72, weight: 'bold', y: 900 },
{ text: 'Audit every recurring charge.', size: 52, weight: 'normal', y: 990 },
{ text: 'Cancel what you forgot existed.', size: 52, weight: 'normal', y: 1060 },
],
},
{
imagePath: './pinterest_images/finance/image_005.jpg',
lines: [
{ text: '03. Use cash envelopes', size: 72, weight: 'bold', y: 900 },
{ text: 'Allocate per category, in cash.', size: 52, weight: 'normal', y: 990 },
{ text: 'When it runs out, it runs out.', size: 52, weight: 'normal', y: 1060 },
],
},
{
imagePath: './pinterest_images/finance/image_006.jpg',
lines: [
{ text: 'Save this post 🔖', size: 80, weight: 'bold', y: 860 },
{ text: 'Follow for more money tips', size: 56, weight: 'normal', y: 970 },
{ text: 'every week →', size: 56, weight: 'normal', y: 1050 },
],
},
]
// ─── 辅助函数 ──────────────────────────────────────────────
function wrapText(ctx, text, maxWidth) {
const words = text.split(' ')
const lines = []
let current = ''
for (const word of words) {
const test = current ? `${current} ${word}` : word
if (ctx.measureText(test).width > maxWidth && current) {
lines.push(current)
current = word
} else {
current = test
}
}
if (current) lines.push(current)
return lines
}
async function generateSlide(slide, index) {
const canvas = createCanvas(CANVAS_W, CANVAS_H)
const ctx = canvas.getContext('2d')
// 1. 绘制背景图片,cover 模式适配
const img = await loadImage(slide.imagePath)
const scale = Math.max(CANVAS_W / img.width, CANVAS_H / img.height)
const drawW = img.width * scale
const drawH = img.height * scale
const offsetX = (CANVAS_W - drawW) / 2
const offsetY = (CANVAS_H - drawH) / 2
ctx.drawImage(img, offsetX, offsetY, drawW, drawH)
// 2. 暗色遮罩
ctx.fillStyle = `rgba(${OVERLAY_COLOR},${OVERLAY_OPACITY})`
ctx.fillRect(0, 0, CANVAS_W, CANVAS_H)
// 3. 绘制每一行文字
const PADDING = 80
const MAX_TEXT_W = CANVAS_W - PADDING * 2
for (const line of slide.lines) {
ctx.font = `${line.weight} ${line.size}px sans-serif`
ctx.fillStyle = '#ffffff'
ctx.textAlign = 'center'
ctx.textBaseline = 'middle'
// 文字阴影
ctx.shadowColor = 'rgba(0,0,0,0.75)'
ctx.shadowBlur = 12
ctx.shadowOffsetY = 4
const wrapped = wrapText(ctx, line.text, MAX_TEXT_W)
const lineHeight = line.size * 1.2
wrapped.forEach((l, i) => {
ctx.fillText(l, CANVAS_W / 2, line.y + i * lineHeight)
})
}
// 4. 导出 PNG
mkdirSync(OUTPUT_DIR, { recursive: true })
const outPath = join(OUTPUT_DIR, `slide_${String(index + 1).padStart(2, '0')}.png`)
const buffer = canvas.toBuffer('image/png')
writeFileSync(outPath, buffer)
console.log(`✓ ${outPath}`)
}
// ─── 主函数 ─────────────────────────────────────────────────
async function main() {
console.log(`Generating ${slides.length} slides...`)
for (let i = 0; i < slides.length; i++) {
await generateSlide(slides[i], i)
}
console.log(`\nDone → ${OUTPUT_DIR}/`)
}
main().catch(console.error)
运行脚本
node generate-slides.js
输出:
Generating 6 slides...
✓ output/slide_01.png
✓ output/slide_02.png
✓ output/slide_03.png
✓ output/slide_04.png
✓ output/slide_05.png
✓ output/slide_06.png
Done → output/
使用自定义字体
下载任何 TTF/OTF 字体(例如 Inter Bold、Montserrat Black)并注册:
import { GlobalFonts } from '@napi-rs/canvas'
GlobalFonts.registerFromPath('./fonts/Montserrat-Black.ttf', 'MontserratBlack')
// 然后在 ctx.font 中使用:
ctx.font = `bold 88px MontserratBlack`
从 JSON 配置批量生成
不再每次编辑脚本,而是从 JSON 文件驱动:
// slides-config.json
[
{
"imagePath": "./pinterest_images/finance/image_001.jpg",
"lines": [
{ "text": "I saved $5k in 6 months", "size": 88, "weight": "bold", "y": 860 },
{ "text": "doing this one thing", "size": 72, "weight": "normal", "y": 970 }
]
}
]
在 generate-slides.js 顶部替换 slides 数组:
import { readFileSync } from 'fs'
const slides = JSON.parse(readFileSync('./slides-config.json', 'utf-8'))
现在你的内容团队可以编辑 slides-config.json 而无需碰代码。结合 Claude Opus 4.7 输出的钩子列表,你就拥有了一条全自动的内容流水线。
第五步:用 Postiz Agent CLI 排期发布
幻灯片制作完成并处理好之后,就是安排发布时间了。Postiz 充当你的发布指挥中心,处理时间安排、跨平台发布和互动自动化。
安装与认证
# 安装
npm install -g postiz
# 认证
# 前往 postiz.com → 免费注册 → Settings → API Keys → 复制密钥
# 设置 API 密钥(添加到 ~/.zshrc 或 ~/.bashrc 以持久化)
export POSTIZ_API_KEY=***
验证是否生效:
postiz integrations:list
这会返回所有已连接社交账号的 JSON 数据。如果看到空数组 [],需要先连接 TikTok。
将 TikTok 连接到 Postiz
前往 app.postiz.com → Integrations → Add Channel → TikTok → 授权。连接后,运行 integrations:list 会看到:
[
{
"id": "clx9abc123",
"provider": "tiktok",
"name": "My TikTok Account",
"picture": "https://..."
}
]
复制这个 id,每个 posts:create 命令都需要它。
TikTok 核心 CLI 命令
# 上传幻灯片(PNG 文件),获取 CDN URL
SLIDE1=$(postiz upload ./output/slide_01.png | jq -r '.path')
SLIDE2=$(postiz upload ./output/slide_02.png | jq -r '.path')
SLIDE3=$(postiz upload ./output/slide_03.png | jq -r '.path')
# 排期一个幻灯片帖子 — 每张幻灯片使用 -m 标志
postiz posts:create \
-c "I saved \$5k in 6 months doing this 💰 #personalfinance #moneytips" \
-m "$SLIDE1" -m "$SLIDE2" -m "$SLIDE3" \
-s "2025-04-21T09:00:00Z" \
-i "clx9abc123"
# 列出所有已排期的帖子
postiz posts:list
# 查看 TikTok 特定设置
postiz integrations:settings clx9abc123
每个命令都输出结构化 JSON,便于在脚本中解析或通过管道传递给其他工具。
从 schedule.json 批量排期整周内容
// batch-schedule.js
// 读取 schedule.json,上传每组幻灯片,通过 Postiz Agent CLI 排期
import { execSync } from 'child_process'
import { readFileSync } from 'fs'
const INTEGRATION_ID = process.env.TIKTOK_INTEGRATION_ID
const schedule = JSON.parse(readFileSync('./schedule.json', 'utf-8'))
for (const post of schedule) {
// 1. 上传每张 PNG 幻灯片,收集 CDN URL
const slideFlags = post.slides.map(slide => {
const result = JSON.parse(execSync(`postiz upload ${slide}`).toString())
return `-m "${result.path}"`
}).join(' ')
// 2. 通过 Postiz Agent 排期幻灯片帖子
execSync(
`postiz posts:create \
-c "${post.caption}" \
${slideFlags} \
-s "${post.scheduledAt}" \
-i "${INTEGRATION_ID}"`,
{ stdio: 'inherit' }
)
console.log(`✓ Scheduled: ${post.slides.length} slides at ${post.scheduledAt}`)
}
// schedule.json
[
{
"slides": ["./output/mon_01.png", "./output/mon_02.png", "./output/mon_03.png", "./output/mon_04.png", "./output/mon_05.png", "./output/mon_06.png"],
"caption": "I saved $5k in 6 months doing this 💰 #personalfinance",
"scheduledAt": "2025-04-21T09:00:00Z"
},
{
"slides": ["./output/tue_01.png", "./output/tue_02.png", "./output/tue_03.png", "./output/tue_04.png", "./output/tue_05.png", "./output/tue_06.png"],
"caption": "Stop putting money in these 3 things 🚫 #moneytips",
"scheduledAt": "2025-04-22T09:00:00Z"
},
{
"slides": ["./output/wed_01.png", "./output/wed_02.png", "./output/wed_03.png", "./output/wed_04.png", "./output/wed_05.png", "./output/wed_06.png"],
"caption": "The money trap nobody warns you about 😮 #finance",
"scheduledAt": "2025-04-23T09:00:00Z"
}
]
运行:
TIKTOK_INTEGRATION_ID=clx9abc123 node batch-schedule.js
一条命令,整周排期完成。
第六步:草稿模式与安全发布
这是整个 TikTok 自动化方案中最容易被忽视的部分。如果通过 API 在计划时间直接从服务器 IP 发布帖子,TikTok 的系统最终会将这种模式标记为机器人行为:减少推荐、影子封禁、甚至封号。
安全方案:上传到草稿箱,从 App 手动发布。
为什么草稿模式很重要
当你通过 API 自动发布时,TikTok 会看到:
- 来自同一 IP 的一致发布间隔
- 没有设备交互历史
- 没有滚动/观看/点赞行为
当你从草稿箱发布时:
- 看起来像真人用户操作
- 来自实际设备
- 有正常的用户行为模式
这一个改变对账号健康度有很大影响,尤其是新账号或高频发布时。
混合工作流
[generate-slides.js] → PNG 幻灯片 (slide_01.png ... slide_06.png)
↓
[Postiz 通知模式] → 在高峰时间发送推送通知
↓
[你打开 TikTok App] → 草稿箱 → 检查 → 点击发布
Postiz 处理排期日历和提醒。实际发布来自你的设备,这对算法来说是一个干净的信号。
方案 1:在 Postiz 中保存为草稿(保存在 Postiz,不发布)
使用 -t draft 标志:
# 先上传视频
RESULT=$(postiz upload video.mp4)
VIDEO_URL=$(echo "$RESULT" | jq -r '.path')
# 创建帖子为草稿
postiz posts:create \
-c "Your caption #fyp" \
-m "$VIDEO_URL" \
-s "2026-04-20T10:00:00Z" \
-t draft \
-p tiktok \
--settings '{
"title": "Video title",
"privacy_level": "PUBLIC_TO_EVERYONE",
"duet": false,
"stitch": false,
"comment": true,
"autoAddMusic": "no",
"brand_content_toggle": false,
"brand_organic_toggle": false,
"video_made_with_ai": false,
"content_posting_method": "DIRECT_POST"
}' \
-i "tiktok-integration-id"
帖子将保存在 Postiz 中作为草稿,直到你更改状态才会发布。使用 postiz posts:status <id> --status schedule 排队发布,或使用 posts:delete 丢弃。
方案 2:推送到 TikTok 收件箱(TikTok App 内的草稿)
如果你希望帖子出现在 TikTok App 中作为待处理草稿,在手机上完成最终操作,将 content_posting_method 设置为 "UPLOAD":
postiz posts:create \
-c "Caption shown when you open TikTok app" \
-m "$VIDEO_URL" \
-s "2026-04-20T10:00:00Z" \
-p tiktok \
--settings '{
"privacy_level": "SELF_ONLY",
"content_posting_method": "UPLOAD"
}' \
-i "tiktok-integration-id"
当 Postiz "发布" 时,TikTok 将视频投递到 App 的收件箱。你打开 App → 点击通知 → 完成最终编辑 → 手动发布。
配置 Postiz 为通知模式
将 Postiz 设置为通知模式而非自动发布。Postiz 管理你的编辑日历,在计划时间发送推送通知提醒你从 App 发布草稿。
在计划时间,Postiz 发送手机推送通知:"该发布 TikTok 了!" 打开 App,找到等待的草稿,点击发布。
常见问题排查
POSTIZ_API_KEY 环境变量缺失
当前 shell 会话未导出密钥。永久添加:
echo 'export POSTIZ_API_KEY=***' >> ~/.zshrc
source ~/.zshrc
postiz integrations:list 返回空数组 []
你的 TikTok 账号尚未连接到 Postiz。前往 app.postiz.com → Integrations → Add Channel → TikTok → 授权。
postiz upload 失败
检查你的 POSTIZ_API_KEY 是否仍然有效。对于较大的 PNG 文件,可以先使用 pngquant 压缩:
pngquant --quality=80-90 output/slide_*.png --ext .png --force
排期的帖子没有发布
运行 postiz posts:list 查看状态字段。如果显示失败,Postiz 会显示错误原因(通常是 TikTok OAuth 令牌过期或达到速率限制)。在 app.postiz.com 重新认证后重新排期。
注意:确保你的账号已经发布了一段时间,且确实是健康账号。
总结
这个自动化工作流将 TikTok 幻灯片内容创作从手动操作转变为全自动流水线:
- 灵感收集 → 从 TikTok 热门内容中提取钩子
- AI 分析 → Claude Opus 4.7 分析并生成钩子变体
- 图片获取 → Pinterest 获取高质图片
- 自动生成 → Node.js 脚本合成 1080×1920 幻灯片
- 智能排期 → Postiz CLI 批量排期
- 安全发布 → 草稿箱模式保护账号健康
所有代码和配置都已包含,你可以直接复制使用。祝好运 🫡
