Social Media Content Factory

This workflow generates social media posts via a chat trigger, creating content for X Twitter, Instagram, Facebook, or LinkedIn. Key nodes include Chat Message Trigger (receives input), Input Validation (checks input length), Validate Input Check (ensures validity), Social Media Router Agent (routes to platforms), X Twitter/Instagram/Facebook/LinkedIn Tool (platform-specific tools), Content Creator Agent (generates content), Generate Image (creates images), Save Image to Cloud (stores images), Load Schema Config/System Prompt (fetches configurations), Process Schema/System Prompt (parses data), Compose Content Request (prepares AI input), Format Final Response (formats output), Success Response (returns success), Validation/Content/Image Error Handler (handles errors), Error Response (returns errors). It uses OpenAI, Google Docs, and ImgBB APIs.\n\nSetup Requirements: Install n8n from n8n.io or sign up at cloud.n8n.io. Import the JSON into n8n’s workflow editor. Create an OpenAI API key at platform.openai.com (Account > API Keys). Set up Google Docs OAuth2 credentials at console.developers.google.com (APIs > Credentials > OAuth 2.0 Client) with two documents for schema and system prompt. Get an ImgBB API key at api.imgbb.com. Configure credentials in n8n: OpenAI (openAiApi), Google Docs (googleDocsOAuth2Api), ImgBB (imgbbApi). Set Chat Message Trigger to accept JSON with chatInput (e.g., 'Create a post about AI') and platform (e.g., 'xtwitter'). Handle errors like short input (400: VALIDATION_ERROR) or invalid API key (500: CONTENT_GENERATION_ERROR). No webhook path configuration is needed for Chat Message Trigger.\n\nTesting and Deployment: Import the JSON into n8n. Test by sending a JSON input: {\"chatInput\": \"Create a post about AI trends\", \"platform\": \"xtwitter\"} to Chat Message Trigger. Verify Input Validation sets haveValidInput. Confirm Content Creator Agent generates content, and Generate Image/Save Image to Cloud produces/stores an image URL. Check Success Response returns status 200 with content and image.url. Test with short input (chatInput: 'Short'; triggers 400: VALIDATION_ERROR). Test with an invalid OpenAI key (500: CONTENT_GENERATION_ERROR) or an incorrect ImgBB key (500: IMAGE_GENERATION_ERROR). Monitor for rate limits (429: Too Many Requests). If the image fails, verify ImgBB credentials. Activate the workflow in n8n to enable continuous content generation. Deploy for reliable social media post creation with robust error handling and output validation.

$6.99

Workflow steps: 26

Integrated apps: chatTrigger, set, if

Social Media Content Factory preview