{
  "name": "Generate AI-Powered LinkedIn Posts with Google Gemini and Gen-Imager",
  "nodes": [
    {
      "id": "ab4282b8-43e9-466a-9986-70e5e449eb5e",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "e593eb90-b859-499b-8b18-3f8fbe8017da",
      "name": "Mapper",
      "type": "n8n-nodes-base.set",
      "position": [
        260,
        0
      ]
    },
    {
      "id": "c48b5989-66ed-4fe2-96a2-6b540ac87d54",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        500,
        0
      ]
    },
    {
      "id": "e56b669f-caa5-435d-be77-8abf8d79d4fc",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        460,
        240
      ]
    },
    {
      "id": "9af3d1f9-3085-4479-83eb-eab69050b65f",
      "name": "Decoder",
      "type": "n8n-nodes-base.code",
      "position": [
        1460,
        0
      ]
    },
    {
      "id": "8ebd423c-16da-4a44-8c96-07683fe4659f",
      "name": "Normalizer",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        0
      ]
    },
    {
      "id": "bb7ac25e-e584-4737-9aa2-4f7e7ffb9971",
      "name": "Text to image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1180,
        0
      ]
    },
    {
      "id": "5feeaf28-1efd-4624-ba09-947133b247ec",
      "name": "LinkedIn",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        1760,
        0
      ]
    },
    {
      "id": "a984e557-1239-4905-bca3-ed6040cef517",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -300
      ],
      "parameters": {
        "width": null,
        "height": 700,
        "content": "> **AI-Powered LinkedIn Post Automation**  \n>  \n> This workflow automates the process of creating LinkedIn posts based on user-submitted topics. It generates both **content** and a **professional imag"
      }
    },
    {
      "id": "a402ed2c-1970-4e4d-b78d-618d335d6034",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "**On Form Submission**  \n> Triggered when a user submits a topic through the form. This starts the workflow and captures the topic to generate a LinkedIn post.\n  "
      }
    },
    {
      "id": "8a027b14-4b84-4efb-b3df-94c29f59ead2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "> **Mapper**  \n> Maps the user-submitted topic from the form and prepares it for the next step by assigning it to a variable (`chatInput`).\n"
      }
    },
    {
      "id": "dcb0b306-9b48-4db9-8bdf-8b39f163d102",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -160
      ],
      "parameters": {
        "width": 300,
        "height": 320,
        "content": "**AI Agent**  \n> Uses the **Google Gemini** model to generate professional content for the LinkedIn post, including text and an image prompt based on the given topic.\n"
      }
    },
    {
      "id": "edc1b46c-2ba7-4de9-bcfd-11bb3f750d17",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": " **Normalizer**  \n> Cleans and formats the AI-generated output into a readable structure for the next steps, extracting both the post text and image prompt.\n"
      }
    },
    {
      "id": "17a43c84-0dbf-4217-bb11-486a58d62c7a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "> **Text to Image**  \n> Sends the image prompt to the **[gen-imager API](https://rapidapi.com/PrineshPatel/api/gen-imager)** to generate a professional image for the LinkedIn post based on the given t"
      }
    },
    {
      "id": "8c1fa58f-c4c1-4751-8126-814ff0c9dfd1",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1380,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "**Decoder**  \n> Decodes the image from its base64 format into a usable binary buffer that can be uploaded to LinkedIn.\n"
      }
    },
    {
      "id": "e1e20396-2fa5-4574-bab6-eb6dbad793fe",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "> **LinkedIn**  \n> Publishes the generated LinkedIn post, including the text and the newly created image, directly to the user's LinkedIn profile.\n"
      }
    }
  ],
  "connections": {
    "Mapper": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decoder": {
      "main": [
        [
          {
            "node": "LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Normalizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalizer": {
      "main": [
        [
          {
            "node": "Text to image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text to image": {
      "main": [
        [
          {
            "node": "Decoder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Mapper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}