Перейти к содержанию
НОВОЕПознакомьтесь с Alaaddin — вашим ИИ-джинном с голосом. trig8n запускается 1 января 2027. Что нового

Библиотека / Изображения, видео и аудио

Изображения, видео и аудио

Генерация видео с ведущим новостей-аватаром из Slack с OpenAI и HeyGen

Запускается на каждое сообщение в Slack: AI-агент составляет 30-секундный сценарий выпуска и отправляет его на одобрение в тред, затем HeyGen создаёт видео с говорящим аватаром, а бот публикует ссылку на него.

Что делает

## 🎬 Slack Chat-to-Avatar-Video Bot ### How it works Message a news headline to your Slack bot → an AI Agent drafts a 30-second English broadcast script → you approve or ask for edits right in the Slack thread → once you confirm, HeyGen generates a talking-avatar video → the bot replies with the video link. Each conversation's state (draft script, status, HeyGen job ID) lives in an n8n Data Table, since two Slack messages are two independent events with no shared memory otherwise. ### Setup checklist (do these before testing) 1. Create your Slack app (api.slack.com/apps → Create New App → From scratch): - OAuth & Permissions → Bot Token Scopes: chat:write, channels:history, im:history, users:read - Event Subscriptions → turn on, set the Request URL to this workflow's "When Slack Message Received" node production webhook URL (shown once you activate the workflow), subscribe to bot events message.channels and message.im - Install the app to your workspace, then invite the bot into the channel (or DM it) - Copy the Bot User OAuth Token + Signing Secret into a new Slack credential in n8n, and connect it to every Slack node here (the trigger and all "Post/Notify ... to Slack" nodes) 2. Create a Data Table (e.g. slack_video_sessions) with columns: channelId, newsContent, script, status, heygenVideoId — all string type. Point every Data Table node at it. 3. HeyGen: create a Header Auth credential (Header Name: X-Api-Key, value = your HeyGen API key) and connect it to "Create HeyGen Video" and "Verify HeyGen Video Status". Replace avatar_id/voice_id in "Create HeyGen Video" with your own (HeyGen → Avatars / Voices — these are two separate IDs even for the same avatar). 4. OpenAI: connect your own OpenAI credential to both model nodes ("Generate Script with OpenAI", "Revise Script with OpenAI"). ### Customization Adjust the AI prompts for script tone/length, the Slack confirmation keywords in "Check User Confirmation", the HeyGen avatar/voice/resolution settings, and the 15s/20-try polling limit to fit your needs.

Шаги

  1. When Slack Message Received
  2. Parse Slack Message
  3. Check User Message Validity
  4. Ignore Non-User Input
  5. Query Pending Session Data
  6. Check Pending Session Existence
  7. News Script Generator
  8. Generate Script with OpenAI
  9. Store Draft Script
  10. Post Draft Script to Slack
  11. Notify Script Generation Failure
  12. Check User Confirmation
  13. Confirm Session Status
  14. Revise Script via Feedback

Всего шагов: 33.

Похожие автоматизации