Showing Posts From
Solopreneur systems
-
Chris Alarcon - 04 Jan, 2025
Automate Social Media Posts with AI (Without Burning $100/mo)
I used to spend Sunday nights batch-scheduling social media posts. Two hours minimum, every week, squinting at Buffer's calendar view while my actual work piled up. Back in the early 2020s, I thought I was being clever - Buffer plus Zapier, basic automations, the whole deal. It worked fine. But when ChatGPT dropped in 2023, I started using it just for headlines because that was the only use case I could think of. Then I kept seeing people talk about "AI agents" and I was like, what even is that? I'm using ChatGPT but it's clearly not the same thing. I tried CrewAI. Too technical, too much terminal stuff. I'm mid-tier technical at best, and it was a turnoff. I tried n8n a few times and gave up - the nodes looked easy but it just didn't click. I'd sign up, get frustrated, abandon it. Then I saw a video about "vibe marketing" and something finally connected. I signed up for n8n's 14-day free trial with one goal: build an automated faceless YouTube channel for Reddit stories. Took me a week and a half. Way more complex than it needed to be. But I finished it - and that's when everything changed. Here's the thing nobody tells you about social media automation: the expensive tools like Hootsuite ($99/mo), Sprout Social ($249/mo), or Later ($25/mo) are solving a problem you can fix for about $20/month with a self-hosted workflow. I'm going to show you exactly how I built my social media automation system. The same one that posts across LinkedIn, Twitter, and Threads without me touching it. No coding background required, just a willingness to spend a few hours setting things up. Why Most Social Media Automation Fails Before we build anything, let's talk about why your current approach probably isn't working. The Buffer/Hootsuite trap: You're still writing every post manually. The tool just schedules it. That's not automation. That's a fancy calendar. The AI content mill problem: Tools like Jasper or Copy.ai can generate posts, but they sound like... AI. Generic hooks, no personality, zero connection to your actual expertise. The "set it and forget it" myth: Most automation breaks within weeks because nobody built in error handling or content variation. Real automation means the system creates, schedules, AND adapts. No babysitting. That's what we're building. The Architecture: How This Actually Works Here's the 30,000-foot view of what we're creating: Content Source (Blog/Newsletter) ↓ n8n Workflow ↓ Claude API (Content Generation) ↓ Platform-Specific Formatting ↓ Scheduling + Posting APIs ↓ Performance TrackingTotal cost breakdown:n8n Cloud: $20/month (or free if self-hosted) Claude API: ~$5-15/month depending on usage Platform APIs: Free (native integrations)Compare that to:Hootsuite Professional: $99/month Sprout Social: $249/month Buffer + AI add-ons: $60+/monthThe math isn't even close.What You'll Need Before Starting Let's get the prerequisites out of the way: Required accounts:n8n account (cloud or self-hosted) Anthropic API key (for Claude) Social platform developer accounts (Twitter/X, LinkedIn, etc.)Time investment:Initial setup: 2-3 hours Testing and refinement: 1-2 hours Ongoing maintenance: 15 minutes/weekTechnical skills:Basic understanding of APIs (I'll explain as we go) Comfort with drag-and-drop interfaces Patience for initial debuggingIf you've never touched n8n before, I'd recommend starting with my n8n Tutorial for Beginners to learn the fundamentals. Then check out my 7 n8n Workflow Examples for inspiration on what to build. Step 1: Setting Up Your Content Source Every good automation starts with a trigger. For social media, that trigger is new content. Option A: Blog Post Webhook If you're automating social posts for blog content (my recommendation), set up a webhook that fires when you publish:In n8n, create a new workflow Add a Webhook node as your trigger Copy the webhook URL Add it to your CMS's publish hook (Astro, WordPress, Ghost all support this)Option B: Manual Content Queue Prefer more control? Use a Notion database or Google Sheet as your content source:Add a Schedule Trigger node (runs every hour) Connect to Notion or Google Sheets node Filter for items marked "Ready to Post"Option C: RSS Feed Already have an RSS feed? Even simpler:Add an RSS Feed Trigger node Point it at your feed URL Set check interval (I use every 30 minutes)For this tutorial, I'll use Option A since it's the most automated approach. Step 2: Connecting Claude for Content Generation This is where the magic happens. We're going to use Claude to transform your blog post into platform-specific social content. Add the HTTP Request node:Create an HTTP Request node after your trigger Set method to POST URL: https://api.anthropic.com/v1/messages Add headers: x-api-key: Your Anthropic API key anthropic-version: 2023-06-01 content-type: application/jsonThe prompt that actually works: Here's the exact prompt structure I use - because generic prompts produce generic content. This one is engineered for engagement: { "model": "claude-sonnet-4-20250514", "max_tokens": 1024, "messages": [ { "role": "user", "content": "You are a social media expert for a solopreneur who teaches automation. Transform this blog post into social media content.\n\nBlog Title: {{$json.title}}\nBlog Summary: {{$json.description}}\nKey Points: {{$json.excerpt}}\n\nCreate:\n1. One LinkedIn post (hook + insight + CTA, 150-200 words)\n2. One Twitter/X thread (5-7 tweets, first tweet is the hook)\n3. One short-form post for Threads (casual, 50-100 words)\n\nRules:\n- Use 'you' and 'I' language\n- Include specific numbers when available\n- No hashtag spam (max 3 per platform)\n- Sound human, not corporate\n- Each piece should stand alone (don't assume reader saw the blog)" } ] }Why this prompt works:Role context: Tells Claude who it's writing for Structured output: Three distinct formats in one call (saves API costs) Specific constraints: Word counts prevent rambling Voice guidelines: Matches my brand's casual-but-expert toneStep 3: Parsing and Formatting the Output Claude returns a single text block. We need to split it into individual posts. Add a Code node: const response = $input.first().json.content[0].text;// Split by platform headers const linkedinMatch = response.match(/LinkedIn[:\s]*([\s\S]*?)(?=Twitter|$)/i); const twitterMatch = response.match(/Twitter[:\s]*([\s\S]*?)(?=Threads|$)/i); const threadsMatch = response.match(/Threads[:\s]*([\s\S]*?)$/i);return { linkedin: linkedinMatch ? linkedinMatch[1].trim() : '', twitter: twitterMatch ? twitterMatch[1].trim() : '', threads: threadsMatch ? threadsMatch[1].trim() : '', originalTitle: $input.first().json.title, publishDate: new Date().toISOString() };This extracts each platform's content into separate fields we can route to different posting nodes. Step 4: Platform-Specific Posting Now we connect to each platform. I'll cover the three I use most. LinkedIn Integration LinkedIn's API requires OAuth 2.0, which n8n handles automatically:Add a LinkedIn node Select "Create Post" operation Connect your LinkedIn account (n8n walks you through OAuth) Map the linkedin field from your Code node to the post contentPro tip: LinkedIn favors posts with line breaks. Add this to your Code node: linkedin: linkedinMatch[1].trim().replace(/\n\n/g, '\n\n\n')Twitter/X Integration Twitter's API has gotten complicated (thanks, Elon), but it still works:Add a Twitter node You'll need Twitter API v2 access (apply at developer.twitter.com) For threads, you'll need multiple tweets linked by reply_to_tweet_idThread posting logic: // Split twitter content into individual tweets const tweets = twitterContent.split(/Tweet \d+:/i).filter(t => t.trim());// First tweet posts normally, subsequent tweets reply to previous let previousTweetId = null; for (const tweet of tweets) { const response = await postTweet(tweet.trim(), previousTweetId); previousTweetId = response.data.id; }Threads/Instagram Integration Meta's Threads API is newer but straightforward:Add an HTTP Request node (Threads doesn't have a native n8n node yet) Use Meta's Graph API endpoint Requires Instagram Business account linked to Facebook PageHonestly, Threads posting is still finicky. I sometimes fall back to Buffer's free tier just for Threads while the API matures. Step 5: Smart Scheduling (Not Just Random Times) Here's where most automations get lazy. They post at fixed times regardless of when your audience is actually online. Add engagement-based scheduling:Create a Google Sheets node that logs post performance After 2-4 weeks, you'll have data on best posting times Add a Code node that adjusts posting time based on historical engagement// Simple version: map day of week to best posting hour const bestTimes = { 'Monday': 9, 'Tuesday': 10, 'Wednesday': 9, 'Thursday': 11, 'Friday': 10, 'Saturday': 11, 'Sunday': 10 };const today = new Date().toLocaleDateString('en-US', { weekday: 'long' }); const postHour = bestTimes[today];// Calculate delay until optimal posting time const now = new Date(); const postTime = new Date(now); postTime.setHours(postHour, 0, 0, 0);if (postTime < now) { postTime.setDate(postTime.getDate() + 1); }return { delayMinutes: Math.round((postTime - now) / 60000), scheduledFor: postTime.toISOString() };Add a Wait node using the calculated delayThis approach improved my engagement by about 30-40% compared to fixed scheduling. Step 6: Error Handling (The Part Everyone Skips) Your workflow WILL break. APIs go down, rate limits hit, content gets flagged. Build for failure: Add an Error Trigger workflow:Create a separate workflow with Error Trigger node Connect it to a Slack or Email node Include the error message, workflow name, and timestampAdd retry logic: In your HTTP Request nodes, enable:Retry on fail: Yes Max retries: 3 Wait between retries: 1000msAdd content validation: Before posting, verify the AI didn't hallucinate: // Basic sanity checks if (content.length < 50) throw new Error('Content too short'); if (content.length > 3000) throw new Error('Content too long'); if (content.includes('undefined')) throw new Error('Template variable failed'); if (content.toLowerCase().includes('as an ai')) throw new Error('AI disclosure leaked');That last check catches when Claude accidentally reveals it's an AI. Instant credibility killer. Step 7: Content Variation (Avoiding the Robot Sound) Post the same format every time and your audience tunes out. Add variation: Rotate content templates: const templates = [ 'hook_insight_cta', // Standard thought leadership 'story_lesson', // Personal narrative 'contrarian_take', // Challenge common belief 'how_to_quick', // Tactical tip 'question_engage' // Start with question ];const todayTemplate = templates[new Date().getDay() % templates.length];Adjust tone by platform:LinkedIn: Professional but personable Twitter: Punchy, opinionated Threads: Casual, conversationalInclude this in your Claude prompt: Platform tone: - LinkedIn: Write as a professional sharing industry insights. Use "we" occasionally. - Twitter: Be direct and slightly provocative. Hot takes welcome. - Threads: Super casual. Write like you're texting a smart friend.The Complete Workflow (Visual Overview) Here's what your finished workflow looks like in n8n: [Webhook Trigger] ↓ [HTTP Request - Claude API] ↓ [Code - Parse Response] ↓ [Code - Calculate Best Time] ↓ [Wait - Delay Until Optimal] ↓ ┌──┴──┐ ↓ ↓ ↓ [LinkedIn] [Twitter] [Threads] ↓ ↓ ↓ [Google Sheets - Log Performance] ↓ [IF - Check for Errors] ↓ [Slack - Notify on Failure]Total nodes: 10-12 depending on platforms Execution time: ~5-10 seconds per run Cost per execution: ~$0.01-0.03 (mostly Claude API) Real Results: My First 30 Days I've been running this system for content promotion since building it. Here's what changed: Time saved:Before: 2+ hours/week on social scheduling After: 15 minutes/week (reviewing and tweaking)Consistency:Before: Posted 3-4x per week (when I remembered) After: 7x per week across all platformsEngagement:LinkedIn impressions up ~40% Twitter engagement roughly same (algorithm is chaos) Threads still too new to measureWhat surprised me: The AI-generated content sometimes outperforms my manual posts. Not because it's better written, but because it's more consistent and always optimized for the platform. Common Mistakes and How to Avoid Them After helping others set up similar systems, here are the pitfalls: Mistake 1: Over-automating Don't automate replies or comments. That's how you get banned and lose authenticity. Automate distribution, keep engagement human. Honestly, my bigger problem was the opposite - I'd build workflows so complex that I'd forget how they worked two weeks later. I spent six months just building automations instead of actually growing anything. Don't be me. Start simple. Mistake 2: Ignoring platform limitsLinkedIn: Max 3 posts/day before reach tanks Twitter: Rate limits are aggressive Threads: Still figuring out optimal frequencyBuild delays into your workflow to respect these limits. Mistake 3: No human review option Add a "review before posting" path for high-stakes content. Use a Wait node with webhook resume, sending yourself a Slack message with approve/reject buttons. Mistake 4: Generic prompts "Write a social media post about this article" produces garbage. Be specific about voice, length, format, and platform conventions. Mistake 5: Not tracking what works If you're not logging performance, you can't improve. The Google Sheets logging step isn't optional - it's how you make the system smarter over time. Extending the System Once the basic workflow runs reliably, consider these additions: Content repurposing: Connect to your content repurposing engine for even more automation. Performance-based scheduling: After collecting enough data, use the social media scheduler with AI optimization approach. Trending topic integration: Pull from your trending topics monitor to post about what's hot. Image generation: Add DALL-E or Midjourney integration for auto-generated visuals (though I find stock images often perform better). FAQs Q: Will this get my accounts flagged as spam? Not if you post reasonable volumes and maintain content quality. The posts look human because Claude writes them well. I've been running this for months with no issues. Q: What about Instagram/Facebook? Doable, but Meta's API requirements are stricter. You need a Business account and approved app. Worth it if those platforms matter for your business. Q: Can I use GPT-4 instead of Claude? Yes. Just swap the API endpoint and adjust the prompt format. I prefer Claude for this use case because it follows formatting instructions more reliably. Q: What if I don't have a blog to repurpose? Adapt the trigger. You could use a Notion database of content ideas, a Google Doc of weekly topics, or even manual input through n8n's form trigger. Q: Is this "cheating" at social media? Every major brand uses automation. The difference is whether your automated content provides real value or just adds noise. Focus on the former. What's Next You now have the blueprint for a social media automation system that costs $20/month instead of $200. But reading about automation doesn't automate anything. Here's your action plan:Today: Sign up for n8n (cloud free tier works fine to start) This week: Get API access for Claude and one social platform Next week: Build the basic webhook → Claude → posting flow Week 3: Add scheduling optimization and error handling Week 4: Expand to additional platformsStart with one platform. Get it bulletproof. Then expand. I built all of this while juggling a full-time job - early mornings, evenings, weekends. That's the reality. I'm not posting from a beach somewhere. I'm carving out time like everyone else, which is exactly why automation matters so much. The compound effect is real. Every post that goes out automatically is time you get back. Every hour saved on scheduling is an hour for actual creative work. That's the whole point of automation. Not to do less - to do more of what matters.Want the actual workflow template? I share templates and build these live in my community. Or subscribe to the newsletter for weekly automation breakdowns.