AutomationFlowsAI & RAG › Plaude 05 - Social Media Content Creator

Plaude 05 - Social Media Content Creator

Plaude 05 - Social Media Content Creator. Uses postgres, agent, lmChatAzureOpenAi. Webhook trigger; 12 nodes.

Webhook trigger★★★★☆ complexityAI-powered12 nodesPostgresAgentLm Chat Azure Open Ai
AI & RAG Trigger: Webhook Nodes: 12 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → Lmchatazureopenai recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Plaude 05 - Social Media Content Creator",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "plaude-social-content",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        0
      ],
      "id": "webhook",
      "name": "Webhook"
    },
    {
      "parameters": {
        "jsCode": "const headers = $input.first().json.headers || {};\nif (headers['x-plaude-api-key'] !== 'bac6629800415b8fd862660f709b7aae7e4fcfd1700418f2acfae4edeb61832a') throw new Error('Unauthorized');\nconst body = $input.first().json.body || $input.first().json;\nif (!body.user_id || !body.meeting_ids) throw new Error('user_id and meeting_ids required');\nreturn [{ json: { ...body, platforms: body.platforms || ['instagram', 'linkedin'], content_types: body.content_types || ['post'], tone: body.tone || 'professional' } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        220,
        0
      ],
      "id": "validate",
      "name": "Validate"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO agent_executions (agent_name, triggered_by, meeting_ids, input_params, status) VALUES ('social', '{{ $json.user_id }}', '{{ JSON.stringify($json.meeting_ids) }}'::jsonb, '{{ JSON.stringify($json).replace(/'/g, \"''\") }}'::jsonb, 'running') RETURNING *",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        440,
        0
      ],
      "id": "log-exec",
      "name": "Log Execution",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "={{ 'SELECT * FROM summaries WHERE meeting_id IN (' + $('Validate').first().json.meeting_ids.map(id => \"'\" + id + \"'\").join(',') + ')' }}",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        660,
        0
      ],
      "id": "fetch-summaries",
      "name": "Fetch Summaries",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const summaries = $input.all().map(item => item.json);\nconst input = $('Validate').first().json;\nconst summaryTexts = summaries.map((s, i) => '--- Reuni\u00e3o ' + (i+1) + ' ---\\n' + s.summary_text + '\\nT\u00f3picos: ' + JSON.stringify(s.key_topics)).join('\\n\\n');\n\nreturn [{ json: { chatInput: 'Plataformas: ' + input.platforms.join(', ') + '\\nTipos: ' + input.content_types.join(', ') + '\\nTom: ' + input.tone + '\\n\\nResumos das reuni\u00f5es:\\n' + summaryTexts } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        880,
        0
      ],
      "id": "compose-prompt",
      "name": "Compose Prompt"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT system_prompt, temperature, max_tokens FROM agent_prompts WHERE agent_name = 'social' AND is_active = true LIMIT 1",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        990,
        0
      ],
      "id": "fetch-agent-prompt",
      "name": "Fetch Agent Prompt",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "={{ $('Fetch Agent Prompt').first().json.system_prompt }}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        1210,
        0
      ],
      "id": "ai-create",
      "name": "AI Create Social Content"
    },
    {
      "parameters": {
        "options": {
          "temperature": "={{ $('Fetch Agent Prompt').first().json.temperature }}",
          "maxTokens": "={{ $('Fetch Agent Prompt').first().json.max_tokens }}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "typeVersion": 1,
      "position": [
        1110,
        220
      ],
      "id": "azure-chat-model",
      "name": "Azure OpenAI Chat Model",
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const content = $input.first().json.output;\nconst cleaned = content.replace(/```json\\n?/g, '').replace(/```\\n?/g, '').trim();\nconst parsed = JSON.parse(cleaned);\nconst input = $('Validate').first().json;\nconst exec = $('Log Execution').first().json;\nconst execId = exec.id;\n\nconst posts = (parsed.posts || []).map(post => ({\n  json: {\n    user_id: input.user_id,\n    meeting_ids: input.meeting_ids,\n    platform: post.platform,\n    content_type: post.content_type,\n    title: post.title || null,\n    body: post.body,\n    hashtags: post.hashtags || [],\n    image_prompt: post.image_prompt || null,\n    _execution_id: execId\n  }\n}));\n\nreturn posts.length > 0 ? posts : [{ json: { _empty: true, _execution_id: execId } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1320,
        0
      ],
      "id": "parse",
      "name": "Parse Posts"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO social_posts (user_id, meeting_ids, platform, content_type, title, body, hashtags, image_prompt) VALUES ('{{ $json.user_id }}', '{{ JSON.stringify($json.meeting_ids) }}'::jsonb, '{{ $json.platform }}', '{{ $json.content_type }}', {{ $json.title ? \"'\" + $json.title.replace(/'/g, \"''\") + \"'\" : 'NULL' }}, '{{ $json.body.replace(/'/g, \"''\") }}', '{{ JSON.stringify($json.hashtags) }}'::jsonb, {{ $json.image_prompt ? \"'\" + $json.image_prompt.replace(/'/g, \"''\") + \"'\" : 'NULL' }}) RETURNING *",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        1540,
        0
      ],
      "id": "insert-posts",
      "name": "Insert Posts",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "UPDATE agent_executions SET status = 'completed', completed_at = NOW(), result_table = 'social_posts' WHERE id = '{{ $('Parse Posts').first().json._execution_id }}'",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        1760,
        0
      ],
      "id": "update-exec",
      "name": "Update Execution",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ success: true, execution_id: $('Parse Posts').first().json._execution_id }) }}"
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1980,
        0
      ],
      "id": "respond",
      "name": "Respond"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Validate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate": {
      "main": [
        [
          {
            "node": "Log Execution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Execution": {
      "main": [
        [
          {
            "node": "Fetch Summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Summaries": {
      "main": [
        [
          {
            "node": "Compose Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compose Prompt": {
      "main": [
        [
          {
            "node": "Fetch Agent Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Agent Prompt": {
      "main": [
        [
          {
            "node": "AI Create Social Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Create Social Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Create Social Content": {
      "main": [
        [
          {
            "node": "Parse Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Posts": {
      "main": [
        [
          {
            "node": "Insert Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert Posts": {
      "main": [
        [
          {
            "node": "Update Execution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Execution": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": true
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Plaude 05 - Social Media Content Creator. Uses postgres, agent, lmChatAzureOpenAi. Webhook trigger; 12 nodes.

Source: https://github.com/Redpine-Internal/PlaudGoldMiner/blob/249f60364638204fbcafa3bc89fc8cd4e5e2b785/n8n-workflows/05-social-creator.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

CLINICAINTEGRAL_secretary. Uses postgres, mcpClientTool, googleDriveTool, toolWorkflow. Webhook trigger; 89 nodes.

Postgres, Mcp Client Tool, Google Drive Tool +14
AI & RAG

Remi 1.1. Uses lmChatOpenAi, memoryPostgresChat, openAi, postgres. Webhook trigger; 89 nodes.

OpenAI Chat, Memory Postgres Chat, OpenAI +7
AI & RAG

secretaria. Uses postgres, n8n-nodes-evolution-api, openAi, httpRequest. Webhook trigger; 71 nodes.

Postgres, N8N Nodes Evolution Api, OpenAI +12
AI & RAG

LineOA. Uses httpRequest, agent, lmChatGoogleGemini, outputParserStructured. Webhook trigger; 69 nodes.

HTTP Request, Agent, Google Gemini Chat +3
AI & RAG

🧪 LABR - nuevo asistente (REPARADO). Uses httpRequest, postgres, postgresTool, toolCalculator. Webhook trigger; 63 nodes.

HTTP Request, Postgres, Postgres Tool +9