{
  "name": "Linkdein Post Generator",
  "nodes": [
    {
      "parameters": {
        "person": "=0250b3270",
        "text": "={{ $('Create Linkdein Post Description').item.json.output }}",
        "shareMediaCategory": "IMAGE",
        "binaryPropertyName": "binary",
        "additionalFields": {
          "title": "={{ $('Generate Title').first().json.output }}"
        }
      },
      "type": "n8n-nodes-base.linkedIn",
      "typeVersion": 1,
      "position": [
        2520,
        120
      ],
      "id": "182b32d3-5231-45cc-afb2-0b16a9906a12",
      "name": "LinkedIn",
      "credentials": {
        "linkedInOAuth2Api": {
          "id": "sg8Krw8RQ7fSXZMB",
          "name": "LinkedIn account"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.openai.com/v1/images/generations",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer 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"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "gpt-image-1"
            },
            {
              "name": "prompt",
              "value": "={{ $json.output }}"
            },
            {
              "name": "size",
              "value": "1024x1024"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2380,
        -240
      ],
      "id": "ac2dd876-a620-4a83-b7c2-6d400a5578d2",
      "name": "Generate Image"
    },
    {
      "parameters": {
        "sendTo": "={{ $('On form submission').item.json.Email }}",
        "subject": "LinkedIn Post is Ready",
        "emailType": "text",
        "message": "=Linkdein post is ready, please check it out here:\n\nTitle:\n\n",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2520,
        480
      ],
      "id": "57410ecc-23ee-4ba5-82a0-1720a29064ce",
      "name": "Send Post",
      "webhookId": "20f8ef41-7183-41f1-9104-a6a042b807ce",
      "credentials": {
        "gmailOAuth2": {
          "id": "AHiOovLS2J9y7cN4",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "formTitle": "LinkedIn Post Generator",
        "formDescription": "Fill out all of the fields to get ready linkdein post",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Email",
              "fieldType": "email",
              "placeholder": "name@example.com",
              "requiredField": true
            },
            {
              "fieldLabel": "Post Topic",
              "placeholder": "Enter a post topic",
              "requiredField": true
            },
            {
              "fieldLabel": "Target Audience",
              "placeholder": "Enter your target audience",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        540,
        100
      ],
      "id": "44d5fb8b-29a6-46e2-8ca8-d35f9e1056c0",
      "name": "On form submission",
      "webhookId": "359fa996-5531-40ae-be37-4a6e136952e2"
    },
    {
      "parameters": {
        "content": "# Create Content\n- Linkdein Post Description\n- Prompt For an Image to Generate with OpenAI\n- Title For Linkdein Post",
        "height": 600,
        "width": 1260
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        960,
        -120
      ],
      "id": "39a16f99-1567-485d-a0c2-29b1424817e6",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1040,
        300
      ],
      "id": "c65fd83e-6c97-4fda-9306-1a80aeb9d897",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "QivR7SxB24l8KozV",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1480,
        300
      ],
      "id": "17879540-076f-426d-8347-b6a8a4a97fda",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "id": "QivR7SxB24l8KozV",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "toolDescription": "Use this tool to search the web. ",
        "method": "POST",
        "url": "https://api.tavily.com/search",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"query\": \"{searchTerm}\",\n  \"topic\": \"general\",\n  \"search_depth\": \"advanced\",\n  \"chunks_per_source\": 3,\n  \"max_results\": 1,\n  \"time_range\": null,\n  \"days\": 7,\n  \"include_answer\": true,\n  \"include_raw_content\": false,\n  \"include_images\": false,\n  \"include_image_descriptions\": false,\n  \"include_domains\": [],\n  \"exclude_domains\": []\n}",
        "placeholderDefinitions": {
          "values": [
            {
              "name": "searchTerm",
              "description": "What the user is searching for"
            }
          ]
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "typeVersion": 1.1,
      "position": [
        1280,
        300
      ],
      "id": "bbf76291-f759-4928-901b-1589b54342fb",
      "name": "Search Web",
      "credentials": {
        "httpHeaderAuth": {
          "id": "4l0UtRoHfchhonn5",
          "name": "Header Auth account 2"
        },
        "httpBearerAuth": {
          "id": "VlM2Ff6onLdCCUZv",
          "name": "Bearer Auth account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=LinkedIn Post: \n{{ $json.output }}",
        "options": {
          "systemMessage": "=** Purpose **\n- You are an AI agent designed to convert LinkedIn posts into visual prompt descriptions. These prompts guide the creation of compelling marketing graphics that visually enhance the written message and align with professional branding standards.\n\n\n** Goals **\n\n- Analyze the content of the LinkedIn post\n\n- Identify the core message, insight, or idea\n\n- Craft a visual prompt that represents the message in a striking and brand-consistent way\n\n- Ensure the prompt is ideal for generating a professional marketing-style graphic, not a literal or hyperrealistic image\n\n\n** Visual Criteria **\nYour graphic prompt must:\n\n- Visually support or represent the key idea from the post\n\n- Be suitable for a modern LinkedIn post (clean, professional, polished)\n\n- Reflect a current design aesthetic (flat, minimalist, creative, sharp)\n\n\n** Output Requirements **\n\n- Output only the final image prompt — no explanation, rephrasing of the post, or surrounding text\n\n- Never include placeholders like \"Header goes here\"\n\n- Include numeric stats or figures if present in the original post\n\n- Do not include quotation marks around the prompt\n\n- Output should be ready to use in a text-to-image tool\n\n\n** Design Style & Elements **\nThink like a professional brand designer or marketing creative. Your visual prompts may include:\n\n- Flat illustrations\n\n- Bold or minimal typography elements (described in the prompt)\n\n- Infographic components (charts, graphs, percentages)\n\n- Modern abstract shapes or gradients\n\n- Metaphors (e.g., lightbulb for ideas, mountain for growth)\n\n- Layout suggestions (e.g., “split-screen layout,” “centered title with subtle overlay”)\n\nOptional: soft shadows, motion-like lines, UI-style elements\n\n\n** Prompt Format Example **\nModern flat-design illustration of a glowing lightbulb emerging from a maze, symbolizing innovation through complexity. Clean background with soft gradient, top-right space for headline text, subtle data overlay on the left side."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        1480,
        100
      ],
      "id": "32418608-2fe5-4009-8bd0-4d6df0d826a4",
      "name": "Create Image Prompt"
    },
    {
      "parameters": {
        "content": "# Generate Image",
        "height": 340,
        "width": 580,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2280,
        -360
      ],
      "id": "7e4d81e6-072c-4e8c-83ef-cc0c234284d3",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1860,
        300
      ],
      "id": "4849d4eb-2514-4526-9dd3-847731b73f55",
      "name": "OpenAI Chat Model2",
      "credentials": {
        "openAiApi": {
          "id": "QivR7SxB24l8KozV",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Post Topic: {{ $json['Post Topic'] }}\n\nTarget Audience: {{ $json['Target Audience'] }}",
        "options": {
          "systemMessage": "=** Purpose **\nCreate LinkedIn posts that are professional, insightful, and engaging — tailored to any topic and audience.\n\n\n** How It Works **\nWhenever you receive a topic, follow this process:\n\n\n1. Research\n\n- Use the Tavily tool to perform a real-time search.\n\n- Gather the most recent, credible, and relevant insights.\n\n- Focus on facts, stats, case studies, and trends that add value.\n\n2. Write the Post\n\n- Start with a strong hook to grab attention.\n\n- Use a professional, confident tone.\n\n- Make it clear and easy to read — short paragraphs, strong flow.\n\n- Prioritize educational and actionable insights.\n\n- Use emojis only when they truly add value (keep it minimal).\n\n- Add proper attribution (e.g., “according to [source]”).\n\n- End with a call to action: invite thoughts, feedback, or shares.\n\n- Include relevant, topic-specific hashtags to increase reach.\n\n\n** Output Rules **\n\nOutput only the final LinkedIn post description.\n\nDon’t explain the post or mention the steps taken.\n\nDon’t include quotation marks or formatting outside of what’s natural in the post.\n\n\n** Sample Use Case **\nTopic: The ROI of warehouse automation\n- You research the latest stats, success stories, and market trends.\n- Then, you craft a polished LinkedIn post with a hook, key data, expert insight, and a strong CTA.\n\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        1060,
        100
      ],
      "id": "2b4584e1-40eb-4d9a-9ba1-eb8a0e6fc90d",
      "name": "Create Linkdein Post Description"
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "data",
        "options": {}
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        2640,
        -240
      ],
      "id": "6299e0a4-f5c1-45b2-ab63-17909a93a77c",
      "name": "Convert to File"
    },
    {
      "parameters": {
        "content": "# Publish",
        "height": 340,
        "width": 580,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2280,
        0
      ],
      "id": "c9a9c64b-20b5-4edd-8395-769be7d0d7f5",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "# Send a Confirmation",
        "height": 340,
        "width": 580,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2280,
        360
      ],
      "id": "b539be81-d631-4ca6-b175-fd956bfc0b0f",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "# Content Ideas",
        "height": 340,
        "width": 580,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        320,
        0
      ],
      "id": "49c9b653-5c16-4282-a487-38ac37efdcf2",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Description: {{ $('Create Linkdein Post Description').item.json.output }}",
        "options": {
          "systemMessage": "** Overview **\nYour job is to create a clear & highly engaging title for the linkdein post based on it's description.\n\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        1900,
        100
      ],
      "id": "7902a3da-c637-492a-9e47-5727638c82d2",
      "name": "Generate Title"
    }
  ],
  "pinData": {},
  "connections": {
    "Generate Image": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Create Linkdein Post Description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Create Linkdein Post Description",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Create Image Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Search Web": {
      "ai_tool": [
        [
          {
            "node": "Create Linkdein Post Description",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Image Prompt": {
      "main": [
        [
          {
            "node": "Generate Title",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Post": {
      "main": [
        []
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Title",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "LinkedIn": {
      "main": [
        [
          {
            "node": "Send Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Linkdein Post Description": {
      "main": [
        [
          {
            "node": "Create Image Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Title": {
      "main": [
        [
          {
            "node": "Generate Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b2463c03-f74f-4013-9121-a4a3f720c774",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f96a7e8659163312cbaf16ad76688747ea79fa6bf8e4ec720c14444abdf2c12c"
  },
  "id": "ExUkzy09AgIp2b2a",
  "tags": []
}