← All N8N workflows
AI & researchAgentChat TriggerCodeExecute Workflow TriggerExtract From File

✨🩷Automated Social Media Content Publishing Factory + System Prompt Composition

Configured with Agent, Chat Trigger, Execute Workflow Trigger, Extract From File, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen chat messagereceivedChat TriggerSubworkflowX-TwiterTool WorkflowSubworkflowInstagramTool WorkflowData storeWindow Buffer MemoryMemory Buffer WindowTriggerWhen Executed byAnother WorkflowExecute Workflow TriggerSubworkflowFacebookTool WorkflowSubworkflowLinkedInTool WorkflowSubworkflowShortTool WorkflowSubworkflowYouTube ShortTool WorkflowWeb / APIpollinations.ai1HTTP RequestWeb / APISave Image to imgbb.comHTTP RequestMessagingGmailGmailFiles / mediaSocial Media SchemaGoogle DocsFiles / mediaSocial Media SystemPromptGoogle DocsAI & modelsgpt-40-miniOpenAI Chat ModelWeb / APIInstagram ImageHTTP RequestMessagingX PostTwitterIntegrationInstragram PostFacebook Graph ApiIntegrationFacebook PostFacebook Graph ApiMessagingLinkedIn PostLinked InMessagingGmail User for ApprovalGmailWeb / APIGet Social Post ImageHTTP RequestAI & modelsgpt-40-mini1OpenAI Chat ModelAI & modelsgpt-4o-miniOpenAI Chat ModelTransformSchemaEdit FieldsTransformSystem PromptEdit FieldsCodeParse SchemaCodeCodeParse System PromptCodeTransformCompose Prompt & SchemaEdit FieldsAI & modelsSocial Media ContentCreatorAgentTransformMerge Prompts andSchemaMergeTransformSocial ContentEdit FieldsFiles / mediaSave Image to GoogleDriveGoogle DriveTransformMergeMergeFiles / mediaSave Social Post toGoogle DriveGoogle DriveTransformGoogle Drive Image MetaEdit FieldsTransformSocial Post JSONEdit FieldsTransformRespond with GoogleDrive IdEdit FieldsMessagingTelegram SuccessMessage (Optional)TelegramMessagingTelegram Error Message(Optional)TelegramRoutingSocial Media PublishingRouterSwitchAI & modelsPrepare Email ContentsAgentRoutingIs Approved?IfTransformFile IdEdit FieldsFiles / mediaGet Social Post fromGoogle DriveGoogle DriveTransformExtract as JSONExtract From FileTransformMerge Image and PostContentsMergeRoutingImplement Threads HereNo OpRoutingImplement YouTubeShorts HereNo OpTransformX ResponseEdit FieldsTransformInstagram ResponseEdit FieldsTransformFacebook ResponseEdit FieldsTransformLinkedIn ResponseEdit FieldsAI & models🤖Social Media RouterAgentAgentIntegrationSerpAPITool Serp ApiAI & modelsPrepare Social MediaEmail ContentsAgentAI & modelsgpt-4oOpenAI Chat Model

Node categories in this workflow

  • Trigger
  • Subworkflow
  • Data store
  • Web / API
  • Messaging
  • Files / media
  • AI & models
  • Integration
  • Transform
  • Code
  • Routing

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When chat message receivedTriggerChat TriggerSee node parameters
X-TwiterSubworkflowTool WorkflowSee node parameters
InstagramSubworkflowTool WorkflowSee node parameters
Window Buffer MemoryData storeMemory Buffer WindowSee node parameters
When Executed by Another WorkflowTriggerExecute Workflow TriggerSee node parameters
FacebookSubworkflowTool WorkflowSee node parameters
LinkedInSubworkflowTool WorkflowSee node parameters
ShortSubworkflowTool WorkflowSee node parameters
YouTube ShortSubworkflowTool WorkflowSee node parameters
pollinations.ai1Web / APIHTTP RequestSee node parameters
Save Image to imgbb.comWeb / APIHTTP RequestPOST
GmailMessagingGmailSee node parameters
Social Media SchemaFiles / mediaGoogle Docsget
Social Media System PromptFiles / mediaGoogle Docsget
gpt-40-miniAI & modelsOpenAI Chat ModelSee node parameters
Instagram ImageWeb / APIHTTP RequestPOST
X PostMessagingTwitterSee node parameters
Instragram PostIntegrationFacebook Graph ApiSee node parameters
Facebook PostIntegrationFacebook Graph ApiSee node parameters
LinkedIn PostMessagingLinked InSee node parameters
Gmail User for ApprovalMessagingGmailsendAndWait
Get Social Post ImageWeb / APIHTTP RequestSee node parameters
gpt-40-mini1AI & modelsOpenAI Chat ModelSee node parameters
gpt-4o-miniAI & modelsOpenAI Chat ModelSee node parameters
SchemaTransformEdit FieldsSee node parameters
System PromptTransformEdit FieldsSee node parameters
Parse SchemaCodeCodeSee node parameters
Parse System PromptCodeCodeSee node parameters
Compose Prompt & SchemaTransformEdit FieldsSee node parameters
Social Media Content CreatorAI & modelsAgentSee node parameters
Merge Prompts and SchemaTransformMergeSee node parameters
Social ContentTransformEdit FieldsSee node parameters
Save Image to Google DriveFiles / mediaGoogle DriveSee node parameters
MergeTransformMergeSee node parameters
Save Social Post to Google DriveFiles / mediaGoogle DrivecreateFromText
Google Drive Image MetaTransformEdit FieldsSee node parameters
Social Post JSONTransformEdit FieldsSee node parameters
Respond with Google Drive IdTransformEdit FieldsSee node parameters
Telegram Success Message (Optional)MessagingTelegramSee node parameters
Telegram Error Message (Optional)MessagingTelegramSee node parameters
Social Media Publishing RouterRoutingSwitchSee node parameters
Prepare Email ContentsAI & modelsAgentSee node parameters
Is Approved?RoutingIfSee node parameters
File IdTransformEdit FieldsSee node parameters
Get Social Post from Google DriveFiles / mediaGoogle Drivedownload
Extract as JSONTransformExtract From FilefromJson
Merge Image and Post ContentsTransformMergeSee node parameters
Implement Threads HereRoutingNo OpSee node parameters
Implement YouTube Shorts HereRoutingNo OpSee node parameters
X ResponseTransformEdit FieldsSee node parameters
Instagram ResponseTransformEdit FieldsSee node parameters
Facebook ResponseTransformEdit FieldsSee node parameters
LinkedIn ResponseTransformEdit FieldsSee node parameters
🤖Social Media Router AgentAI & modelsAgentSee node parameters
SerpAPIIntegrationTool Serp ApiSee node parameters
Prepare Social Media Email ContentsAI & modelsAgentSee node parameters
gpt-4oAI & modelsOpenAI Chat ModelSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • facebookGraphApi
  • gmailOAuth2
  • googleDocsOAuth2Api
  • googleDriveOAuth2Api
  • linkedInOAuth2Api
  • openAiApi
  • serpApi
  • telegramApi
  • twitterOAuth2Api

Workflow notes

Create Post Image

Create Post Image

https://pollinations.ai/ https://image.pollinations.ai/prompt/[your image description]

Sticky Note41

💡Notes

Update all Social Media Platform Credentials as required.

Adjust parameters and content for each platform to suit your needs.

Sticky Note1

<youtube_short> Style: Short-form video content showcasing quick workflow tutorials or use cases. Tone: Authoritative yet approachable; establish workflows.diy as a leader in n8n automation solutions. Content Length: Tutorials/Reviews (long-form): 5-10 minutes Shorts/Highlights (short-form): Under 1 minute CTA: Encourage subscriptions, likes, comments (e.g., "Subscribe for more workflow tips!"). </youtube_short>

Sticky Note2

<youtube_short> { "type": "object", "properties": { "video_suggestion": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "call_to_action": { "type": "string" } } } </youtube_short>

Send Social Media Image and Post Contents to Gmail

Send Social Media Image and Post Contents to Gmail

(optional)

1️⃣System Prompt Composition from External Source

1️⃣System Prompt Composition from External Source

Centralized prompt management: Store and update system prompts in Google Docs for easy team collaboration

  • Consistent brand voice: Ensure all generated content maintains consistent tone and style across platforms

  • Flexible customization: Quickly modify prompts without changing workflow code

  • Version control: Track changes to prompts over time with Google Docs revision history

  • Role-specific access: Control who can edit core prompts while allowing broader viewing access

2️⃣Output Schema Composition from External Source

2️⃣Output Schema Composition from External Source

  • Structured content generation: Enforce consistent JSON output formats for each platform

  • Platform-specific optimization: Tailor content structure to each social network's requirements

  • Reduced errors: Validate content against schemas before publishing

  • Easy updates: Modify schemas as platform requirements change without workflow modifications

  • Standardized metadata: Ensure all required fields are included for each platform

4️⃣ Dynamic Social Media Content Creator Agent with Web Search Tool to Match Social Post and Platform Schema

4️⃣ Dynamic Social Media Content Creator Agent with Web Search Tool to Match Social Post and Platform Schema

  • Real-time research: Incorporate current events and trending topics into content

  • Fact-checking: Verify information before publishing to maintain credibility

  • Competitive analysis: Reference industry trends and competitor content

  • Contextual relevance: Create content that responds to current market conditions

  • Enhanced engagement: Generate content that aligns with trending conversations

5️⃣ Dynamic Image Creation to Match Social Post & Platform Schema

5️⃣ Dynamic Image Creation to Match Social Post & Platform Schema

  • Visual consistency: Generate platform-optimized images that match content themes

  • Automated alt text: Create accessibility-compliant image descriptions

  • Multi-format output: Generate images in various dimensions for different platforms

  • Brand compliance: Ensure all visuals align with brand guidelines

  • Reduced design bottlenecks: Eliminate waiting for custom graphics for each post

6️⃣ Image Archiving to Multiple Cloud Services for Future Use

6️⃣ Image Archiving to Multiple Cloud Services for Future Use

  • Redundant storage: Prevent content loss with multi-location backups

-Searchable repository: Build a library of past content for reference and reuse

  • Asset tracking: Maintain records of which images were used for which campaigns

  • Compliance documentation: Keep records of published content for regulatory purposes

  • Resource optimization: Reuse successful visual assets for future campaigns

7️⃣ Telegram Messaging for Workflow Status

7️⃣ Telegram Messaging for Workflow Status

  • Real-time notifications: Get immediate alerts about workflow execution

  • Error tracking: Quickly identify and address failures in the content pipeline

  • Team coordination: Keep stakeholders informed of content progress

  • Audit trail: Maintain records of when content was created and published

  • Remote monitoring: Track workflow execution from mobile devices

8️⃣ Optional Workflow Reporting to Gmail in with Structured HTML Content

8️⃣ Optional Workflow Reporting to Gmail in with Structured HTML Content

  • Executive summaries: Provide management with clean, formatted reports

  • Content approval: Enable stakeholders to review content before publishing

  • Performance tracking: Document content metrics in standardized formats

  • Schedule adherence: Monitor if content is being published according to plan

  • Resource allocation: Track time and effort spent on different content types

9️⃣ Social Post Archiving to Google Drive for Future Use

9️⃣ Social Post Archiving to Google Drive for Future Use

  • Content library: Build a searchable repository of all published content

  • Performance correlation: Connect content with its performance metrics

  • Compliance records: Maintain documentation of published materials

  • Content repurposing: Easily find and adapt past successful content

  • Campaign documentation: Group related content for campaign analysis

3️⃣Dynamic System Prompt and Platform Schema Composition based on User Prompt using External Sources

3️⃣Dynamic System Prompt and Platform Schema Composition based on User Prompt using External Sources

  • Centralized prompt management: Store all system prompts in a single external source for easier maintenance and updates

  • Platform-specific optimization: Automatically tailor content to each platform's unique requirements and audience expectations

  • Consistent brand voice: Ensure all generated content maintains your brand's tone and messaging guidelines across platforms

  • Reduced technical debt: Modify prompts and schemas without changing workflow code or redeploying applications

  • Collaborative improvement: Enable marketing teams to refine prompts without developer intervention

  • Version control: Track changes to prompts and schemas over time with document revision history

  • A/B testing capability: Easily test different prompt variations to optimize content performance

  • Scalable content strategy: Add support for new platforms by simply creating new prompt and schema documents

  • Dynamic adaptation: Respond to platform algorithm changes by quickly updating external prompt documents

  • Knowledge preservation: Maintain institutional knowledge about effective platform-specific content strategies

  • Reduced onboarding time: New team members can understand content requirements by reviewing documented prompts

  • Compliance management: Ensure all generated content follows legal and brand guidelines by centralizing rules

Sticky Note43

💡Notes

  • Create Google Doc for the Social Media Schema and copy the provided schema.

  • Update the Google Doc ID in the Social Media Schema node.

  • Create Google Doc for the Social Media System Prompt and copy the provided System Prompt.

  • Update the Google Doc ID in the Social Media System Prompt node.

Adjust system prompt and platform specific prompts to suit your needs.

Sticky Note44

💡Notes

Replace pollinations.ai with any online image generation service that produces an image file you can download.

Sticky Note45

💡Notes

Replace Chat model with other LLMs and test out the results. Add more tools or try other web search tools to suit your use case.

✨🩷Automated Social Media Content Publishing Factory + System Prompt Composition

✨🩷Automated Social Media Content Publishing Factory + System Prompt Composition

Purpose and structure

This folder contains the ✨🩷Automated Social Media Content Publishing Factory + System Prompt Composition workflow. Its executable nodes use agent, chatTrigger, code, executeWorkflowTrigger, extractFromFile, facebookGraphApi, gmail, googleDocs, googleDrive, httpRequest, if, linkedIn, lmChatOpenAi, memoryBufferWindow, merge, noOp, set, switch, telegram, toolSerpApi, toolWorkflow, twitter. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When chat message received, When Executed by Another Workflow

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Linkedin/1342_Linkedin_Telegram_Automate_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • LLM
  • Chat Memory
  • 👍Start Here
  • Social Media Publishing Router
  • 1️⃣ X - Twitter
  • 2️⃣ Instagram
  • 3️⃣ Facebook
  • 4️⃣ LinkedIn
  • 5️⃣Threads
  • 6️⃣YouTube Shorts
  • Social Media Agent Tools
  • 🏭Social Media Content Factory
  • 👍 Approve Content Before Proceeding
  • Prompt & Schema Composition from External Sources
  • 👈System Prompt
  • 👈Social Media Schema
  • External System Prompt and Schema
  • 📄 Publish to Social Media
  • Social Media Content Creator
  • Prepare Social Media Post and Save to Google Drive
  • Social Media Schema
  • System Prompt
  • Social Media Router Agent
  • Prepare Email Approval Contents as HTML
  • 💫Features & Benefits

More in AI & research