📱 AI-powered multi-platform social media content factory with dynamic system prompts & GPT-4o

⚡ 1,597 views · 📱 Social Media & Email Marketing

💡 Pro Tip — If you’re pulling LinkedIn data through HTTP requests or dealing with API restrictions, there’s a community node called ScraperNode that handles this natively. It has dedicated scrapers for profiles, companies, jobs, and people search — you just pass a URL and get structured data back.

View All Scrapers

Description

Automated Social Media Content Publishing Factory + System Prompt Composition

This workflow is a powerful automation for creating and publishing social media content. It uses AI to generate content and images based on external prompts and schemas, and routes the final posts to various social media platforms.

How it Works

This workflow operates as a “Content Publishing Factory”. It generates platform-optimized content for platforms like LinkedIn, Instagram, Facebook, X (Twitter), Threads, and YouTube Shorts. A key feature is its dynamic system prompt and output schema composition, which pulls content from external Google Docs to ensure consistency. The workflow can also create images to match the content and send the final draft for approval via email before publishing.

Use Cases

Setup Instructions

  1. Google Docs: Create two Google Docs: one for the social media schema and one for the system prompt, and update the respective node IDs in the workflow.

  2. API Credentials: Provide credentials for the following services:

    • OpenAI: For the AI agents and content creation.
    • SerpAPI: For the web search tool to perform research.
    • Gmail: For sending content for approval and notifications.
    • Google Drive: For archiving images and final posts.
    • Social Media Platforms: You’ll need credentials for the platforms you wish to publish to (X, Instagram, Facebook, LinkedIn, etc.).
    • Image Hosting: The workflow uses imgbb.com to host generated images, requiring an API key.

Workflow Logic

  1. Routing Agent: The Social Media Router Agent receives a user prompt and uses a toolWorkflow node to route the request to the appropriate content generation workflow.

  2. Prompt & Schema Composition: The workflow fetches the system prompt and platform-specific schemas from Google Docs, parses them, and composes a dynamic prompt for the AI agent.

  3. Content Creation: The Social Media Content Creator agent uses the composed prompt and a web search tool to generate platform-optimized content and an image suggestion.

  4. Image Generation & Archiving: The workflow generates an image from the AI suggestion using an external service and archives both the image and the final post content in Google Drive.

  5. Approval Process: The draft content is sent to a Gmail address for approval.

  6. Publishing: If the content is approved, the Social Media Publishing Router node directs the content to the correct publishing node for the specified platform (e.g., X Post, Instagram Image, Facebook Post, etc.).

Node Descriptions

Node NameDescription
When chat message receivedA trigger node that initiates the workflow based on a chat message.
Social Media System PromptA Google Docs node that retrieves the main system prompt for the AI agent.
Social Media SchemaA Google Docs node that retrieves the JSON schema for each social media platform’s output.
Social Media Content CreatorAn AI agent that generates content based on user prompts, system prompts, and schemas, using a web search tool for research.
pollinations.ai1An HTTP Request node that generates an image from a text prompt using an external service.
Gmail User for ApprovalSends a draft of the social media post for approval and pauses the workflow until a decision is made.
Social Media Publishing RouterA Switch node that routes the workflow to the correct publishing node based on the user’s selected platform.
X Post, Instagram Post, Facebook Post, LinkedIn PostThese nodes publish the final, approved content to their respective social media platforms.

Customization Tips

Suggested Sticky Notes for Workflow

Testing Tips

Suggested Tags & Categories

đź”— Nodes Used

HTTP Request, Telegram, Google Drive, Facebook Graph API, X (Formerly Twitter), Gmail

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup