• The Inertia Report
  • Posts
  • How to Build a No-Code AI Agent Workflow for Social Media Automation

How to Build a No-Code AI Agent Workflow for Social Media Automation

No time to format all your posts for different platforms? We got you covered!

Hey Innovators! Here with a big one today - we are going to fully automate creating your social media content using a relatively simple no-code AI agent/Workflow.

If you use social media as a channel to get clients you’ll know that consistency is the key, but it can take hours out of your day. But today, we turn that into minutes!

With this setup, you can:
✅ Automatically grab articles from a Google Sheet
✅ Use Perplexity AI to summarize each article
✅ Leverage AI agents (like OpenAI) to generate tailored posts for LinkedIn, Medium, X (Twitter), Facebook, and more
✅ Auto-post across platforms without writing a single line of code

By the end, you'll have a fully automated AI-powered social media assistant that can research, write, and post on your behalf. Let’s dive in! 🚀

🚀 Overview: What We’re Building

Here’s how the agent works:
1️⃣ Add an article URL to a Google Sheet
2️⃣ The AI agent fetches the article and summarizes it
3️⃣ AI creates social media posts, tailored for each platform
4️⃣ The posts are automatically published to LinkedIn, Medium, X (Twitter), Facebook, and more
5️⃣ A Slack/Gmail notification is sent with a summary to keep you in the loop

🖼️ The entire workflow: For this agent, we’ll use n8n, a powerful no-code workflow automation tool that connects apps, APIs, and AI models. With n8n, we can create custom workflows that handle data processing, AI calls, and social media posting all from an intuitive interface.

🛠 Step 1: Setting Up the Google Sheets Trigger

Our first step is to create a Google Sheet that will act as a content repository for our automation.

🔹 Create a Google Sheet called Media Links with a single column called Media Links
🔹 Each time you add a new URL, it will trigger the workflow
🔹 Use an n8n Google Sheets trigger to watch for new rows

🖼️ The n8n trigger set up

🖼️  The Google sheet: You can use this setup for news articles, blog posts, or any other source content you want to repurpose into social media posts.

🔗 Step 2: Connecting Perplexity AI for Smart Summarization

Instead of manually reading and summarizing articles, let Perplexity AI do the work!

🔹 Why Perplexity AI?
✅ It can access the web for real-time data
✅ It generates concise, accurate summaries
✅ It’s faster than traditional LLMs like ChatGPT for news

🔹 How to Set It Up:
1️⃣ Get a Perplexity API key from Perplexity’s Developer Portal (You will need to sign up if you haven’t yet)
2️⃣ Add an HTTP Request Node in n8n
3️⃣ Configure the API request to fetch a summary of the article
4️⃣ Test the response to make sure the summary is well-structured

🖼️ The request to Perplexity: Follow along on the video to get a step by step if you’re unfamiliar with this. Also, I added the full prompts at the end of the newsletter!

⚙️ Step 3: Generating Social Media Posts with AI

Now, let’s turn summaries into platform-specific content. We’ll use OpenAI to generate customized social media posts for each platform.

🔹 How AI Customizes Content Per Platform:
✅ LinkedInProfessional insights (thought leadership, industry trends)
✅ InstagramShort, visually engaging captions with a call-to-action
✅ Twitter/XConcise & trending tweets (with hashtags!)
✅ MediumLonger blog-style summaries
✅ FacebookConversational post formats

🔹 How to Set It Up in n8n:
1️⃣ Add an AI Agent (OpenAI)
2️⃣ Pass the summarized article from the previous Perplexity step into the prompt
3️⃣ Ask the AI to generate platform-specific posts
4️⃣ Format the responses for easy posting

🖼️ The output in JSON format: Makes it easy to parse for our following step to post to each platform! Again, the prompt for this is below the newsletter.

🤖 Step 4: Automating Posting Across Platforms

Now, let’s connect each social media platform and set up auto-posting.

🔹 Connecting Social Media APIs:
✅ LinkedIn: Use LinkedIn’s API to post automatically
✅ Medium: Auto-publish long-form blog summaries
✅ Twitter/X: Auto-tweet shorter insights & news snippets
✅ Facebook: Format engaging conversational posts

🔹 How to Authenticate APIs:
1️⃣ Get API credentials for LinkedIn, Medium, Twitter/X, and Facebook depending which platforms you need. Each platform has their own dedicated API you’ll need to get from their developer portals
2️⃣ Configure API calls to each platform by adding n8n’s pre-configured node for each platform
3️⃣ Test each connection by sending a sample post

🖼️ An example LinkedIn post: I’d give it a like!

📩 Step 5: Sending AI-Generated Emails & Slack Notifications

Want internal notifications when AI-generated posts go live? Let’s add:
✅ Slack integration to send a post summary to internal teams
✅ Gmail automation to receive AI-generated article digests

🔹 How to Set Up Slack & Gmail Automation:
1️⃣ Add a Slack Notification Node in n8n
2️⃣ Use Gmail’s API to send email summaries
3️⃣ Configure AI to rewrite summaries in an internal-friendly format

💡 Use Case: Marketing teams get real-time notifications when new content goes live!

🚀 Bringing It All Together: End-to-End Automation Workflow

Here’s a quick recap of the full AI automation process:

1️⃣ User adds an article link to Google Sheets
2️⃣ Perplexity AI summarizes the article
3️⃣ OpenAI generates platform-specific social media posts
4️⃣ Posts are automatically published to social platforms
5️⃣ Slack/Gmail notifications are sent for visibility

🎬 Final Workflow Summary:
🟢 Google Sheets → 🟢 Perplexity AI → 🟢 OpenAI → 🟢 Auto-Publish to Socials → 🟢 Notify Teams

💡 Pro Tip: You can expand this workflow by adding:
🔹 Hashtag generators for Twitter/LinkedIn
🔹 AI-powered engagement monitoring
🔹 Scheduling features for optimized posting times

💡 Final Thoughts & Next Steps

This AI-powered social media workflow eliminates manual content creation, saving you hours per week!

🚀 What’s next?
✅ Add more AI-generated visuals (like DALL·E images)
✅ Improve engagement tracking with analytics tools
✅ Integrate AI chatbots for reply automation

If you want to automate social media posting, this is the way to do itno code required!

👉 Try n8n for automation: n8n.io
👉 Experiment with Perplexity AI: Perplexity Docs
👉 Build with OpenAI’s API: OpenAI

Want this, but don’t have the time to build it? Reply and let’s make it happen! 🚀

🤖 Prompts needed for LLMs:

Step 2: Perplexity AI Summarization

✅ HTTP Request Method: POST
✅ API URL: https://api.perplexity.ai/v1/chat/completions
✅ Headers:

{

  "Authorization": "Bearer YOUR_API_KEY",

  "Content-Type": "application/json"

}

✅ Body:

{

  "model": "llama-3.1-sonar-small-128k-online",

  "messages": [

    {

      "role": "system",

      "content": "Be precise and concise."

    },

    {

      "role": "user",

      "content": ""

    }

  ],

  "max_tokens": "Optional",

  "temperature": 0.2,

  "top_p": 0.9,

  "return_citations": true,

  "search_domain_filter": ["perplexity.ai"],

  "return_images": false,

  "return_related_questions": false,

  "search_recency_filter": "month",

  "top_k": 0,

  "stream": false,

  "presence_penalty": 0,

  "frequency_penalty": 1

}

Step 3: AI-Generated Social Media Posts

✅ AI Model: GPT-4 or Claude 3.5 (Your choice)
✅ Prompt:

Based on the following article summary, create tailored social media posts for LinkedIn, Instagram, Twitter (X), Medium, and Facebook. Each post should be formatted to suit the platform’s tone, length, and audience expectations. Provide the output in separate sections for each platform.

- LinkedIn: A professional post that highlights the key insights of the article with a formal tone, suitable for a business or professional audience.  

- Instagram: A short, visually engaging post with a call to action, using 2–3 relevant hashtags, formatted to fit Instagram's audience. The post should be concise but engaging.  

- Twitter (X): A concise post under 280 characters with up to 3 relevant hashtags. The tone should be conversational and engaging.  

- Medium: A longer-form summary of the article that can act as a blog post. The tone should be informative and structured, highlighting key insights and expanding on them.  

- Facebook: A friendly, conversational post that encourages interaction, with a bit more detail than Instagram and Twitter posts. Include a call to action and relevant hashtags.  

Article Summary: