Course/Chapter 7/5. Content Publishing Pipeline
    intermediate
    Chapter 7: Real-World Automation Projects

    5. Content Publishing Pipeline

    Automate content distribution across social platforms.

    30m Lesson 5 of 5

    Automate your content pipeline from CMS to social media, including image processing, caption generation, and multi-platform publishing.

    Pipeline Stages

    1. Trigger: New published post in CMS
    2. Image optimization and resizing
    3. AI-generated social captions per platform
    4. Platform-specific formatting
    5. Scheduled publishing to Twitter, LinkedIn, Facebook

    Platform Formatting Rules

    • - Twitter/X: 280 chars max, 1-2 hashtags, thread for long content
    • - LinkedIn: Up to 3,000 chars, professional tone, 3-5 hashtags
    • - Facebook: Up to 63,206 chars, conversational, include link preview
    • - Instagram: 2,200 chars max, 20-30 hashtags, image required

    Code Examples

    Multi-Platform Caption Generator
    javascript
    const post = $input.first().json;
    
    // Generate platform-specific captions
    const platforms = [
      {
        platform: "twitter",
        prompt: `Write a tweet (max 240 chars) about: ${post.title}. Include 1-2 relevant hashtags. Be punchy and engaging.`,
        maxLength: 280
      },
      {
        platform: "linkedin",
        prompt: `Write a LinkedIn post (200-500 words) about: ${post.title}. Be professional, add insights, include 3-5 hashtags at the end.`,
        maxLength: 3000
      },
      {
        platform: "facebook",
        prompt: `Write a casual Facebook post about: ${post.title}. Be conversational and encourage comments. Include a question to drive engagement.`,
        maxLength: 1000
      }
    ];
    
    return platforms.map(p => ({
      json: { ...p, article_url: post.url, image_url: post.featured_image }
    }));

    Pro Tips

    • 💡Use AI to adapt your message for each platform — LinkedIn is professional, Twitter is concise, Facebook is conversational
    • 💡Schedule posts for optimal times: LinkedIn 8-10am weekdays, Twitter 12-3pm, Facebook 1-4pm
    • 💡Always include the original article link and a compelling featured image

    Comprehension Quiz

    Answer 2 of 2 correctly to unlock lesson completion.

    1. What is the character limit for a tweet on Twitter/X?

    2. Why use AI for multi-platform publishing?

    Pass the quiz above to unlock lesson completion