This n8n AI Agent Avatar will AUTOMATE your Social Media

Learn how to build a fully automated AI Avatar Social Media system that creates talking head AI clone videos, WITHOUT having to film or edit yourself.

This tutorial combines n8n, AI tools agent, HeyGen, and Blotato to research, write, create, and distribute talking head AI clone videos to every social media platform every single day. 100% automated.

  • n8n - workflow automation that runs daily

  • AI agent - uses HackerNews and ChatGPT

  • Heygen - create realistic AI clone/avatar

  • Blotato - publish to all social platforms

Here’s the Youtube version of this post:

Prerequisites

Before diving into the workflow, ensure you have the following accounts set up:

  • n8n: you can use the cloud-hosted version or host it yourself

  • API Accounts and Keys:

    • Heygen: generate AI avatar videos

    • Blotato: publish to social platforms

    • OpenAI: generate scripts and captions

Step 1: Import Template into n8n

Download Template: scroll to the bottom of this page to download the n8n template!

🛑 Scroll to the bottom of this newsletter to get the n8n template to import!

Import into n8n:

  • Open n8n

  • Click “Create Workflow”

  • Click 3 dots

  • Click “Import from File”

Review Workflow:

Once imported, you will see a series of nodes visually connected.

This template automates several tasks: scheduling, fetching news, generating scripts, creating the AI avatar video, and finally publishing to social media.

Step 2. Understand the Workflow

This JSON template is a complete pipeline that automates content creation and distribution. Here’s a breakdown of its primary components:

1. Schedule Trigger:

  • Purpose: Automatically trigger the workflow every day (or at the set hour).

  • How it Works: The node “Schedule Trigger” is configured to start the process at 10 AM daily. Adjust the schedule as needed.

2. News Fetching and Content Generation:

  • Fetching Trending News:

    • Tools Involved: “Fetch HN Front Page” and “Fetch HN Article.”

    • Function: These nodes use HackerNews data to pull the top 10 stories related to AI or LLMs from the last 24 hours.

  • Script Generation by AI Agent:

    • Node: “AI Agent”

    • Function: This node instructs the agent to pick the most viral story, fetch the article along with its comments, and then generate a 30-second script using a defined prompt. I tell ChatGPT to include detailed information, statistics, and a striking viral hook at the beginning.

3. Caption Creation:

  • Write Long Caption:

    • Write a summary paragraph, 3 bullet point questions, and hashtags.

  • Write Short Caption:

    • Write 2-sentence summary for Twitter, Threads, Bluesky.

4. AI Avatar Video Creation:

  • Setup Heygen:

    • Prepares parameters for video creation, including background, avatar, and voice.

  • Create Avatar Video:

    • Calls the Heygen API to generate the video based on the AI-generated script and selected avatar settings.

  • Wait :

    • Ensures there’s enough time for the video to be made, before retrieving the video URL via the "Get Avatar Video" node.

5. Media Upload and Social Media Posting:

  • Uploading the Video:

    • Node: “Upload to Blotato”

    • Function: Sends the video URL to Blotato’s media endpoint.

  • Publishing:

    • Use Blotato API to post the video + captions to all social platforms.

    • The Blotato API currently doesn’t support posting video to Bluesky or Pinterest, so those nodes are deactivated for now. This feature will be available soon, so I left these nodes in the template.

Step 3. Setup & Run Workflow

💡 IMPORTANT: the only 2 nodes where you need to edit the values are “Setup Heygen” and “Prepare for Publish”. Don’t tweak anything else, until the entire workflow is smoothly running and posting to your socials.

Setup Heygen:

  • Paste your Heygen API key

  • Paste your Heygen avatar ID

  • Paste your Heygen voice ID

  • Use the background_video_url that is already filled out (change it later, after ensuring everything works)

Prepare for Publish:

  • Paste your Blotato API key

  • Paste your Blotato account IDs

  • Paste your Facebook page ID

If a social platform is not used, keep its node disabled. You don’t need to fill out the account ID for platforms you’re not publishing to.

1st Test Run:

Enable only 1 social platform, and deactivate the rest for testing purposes. Update the AI agent node’s prompt to return a 5-second script, rather than 30 seconds, to reduce the processing duration. Update the “Wait” node to wait for 2 minutes, rather than 8 minutes, since you’re testing with a super short script.

Now you’re ready to test the entire workflow!

Go to Heygen and check that your avatar video is being processed.

After the workflow finishes, check your social media account for the final post.

If successful, then enable another social media node, and continue testing!

Here’s the link to download my prebuilt n8n template.

(you must be subscribed to this newsletter 👇️ )

Subscribe to keep reading

This content is free, but you must be subscribed to Sabrina Ramonov 🍄 to continue reading.

Already a subscriber?Sign In.Not now