{
  "name": "Generate PDF business proposals with Google Gemini and PDF Generator API",
  "nodes": [
    {
      "id": "5abbd6a4-3073-4fc2-87ea-cb967a1d9379",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1008,
        176
      ]
    },
    {
      "id": "19127e3c-7af6-46a1-ae12-892edad5415a",
      "name": "Convert HTML content to PDF",
      "type": "@pdfgeneratorapi/n8n-nodes-pdf-generator-api.pdfGeneratorApi",
      "position": [
        1440,
        0
      ]
    },
    {
      "id": "d4e6ad89-3812-45fe-91be-68f07c0a74e9",
      "name": "Send the proposal to the customer",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1824,
        0
      ]
    },
    {
      "id": "6db0ccb4-0271-40ac-8408-290a176d8af2",
      "name": "Webhook simulator",
      "type": "n8n-nodes-base.webhook",
      "position": [
        96,
        16
      ]
    },
    {
      "id": "744748c6-e872-404d-95ed-8f0fb9ece3cd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -128
      ],
      "parameters": {
        "width": 352,
        "height": 304,
        "content": "## Example DATA\n\nSimulates incoming data (like a new Excel row) using pinned webhook data."
      }
    },
    {
      "id": "140512e0-424f-4497-9bd9-bbb29b40a9eb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        -176
      ],
      "parameters": {
        "width": 400,
        "height": 416,
        "content": "## Document Creation\n\nThe HTML is converted into a high-quality PDF via the PDFGeneratorAPI.com"
      }
    },
    {
      "id": "46c57849-0262-456b-a7c6-8797285106e8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        -144
      ],
      "parameters": {
        "width": 576,
        "height": 336,
        "content": "##  Delivery & Tracking\n\nThe PDF is emailed to the client via Gmail, and the transaction is logged into a Google Sheet for your records."
      }
    },
    {
      "id": "e5fd38c2-ecab-4735-8dd0-7cf90a765efb",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        464,
        288
      ]
    },
    {
      "id": "f8fcb649-9a9a-465e-b816-fcf400f5eaee",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -144
      ],
      "parameters": {
        "width": 544,
        "height": 576,
        "content": "## Email Verification with Error handling\n\nUses the Hunter API to verify the validity of the provided email address."
      }
    },
    {
      "id": "1dc15e23-fe42-4686-8c3e-c12cef31b933",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2096,
        0
      ]
    },
    {
      "id": "fbe11a5e-2050-4163-9003-6311f82e8089",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        -144
      ],
      "parameters": {
        "width": 432,
        "height": 496,
        "content": "## AI Generation\n\nGoogle Gemini processes the lead data to draft a custom business proposal in HTML format."
      }
    },
    {
      "id": "32314c7d-9ac3-4abc-9e2a-1e871cb0ba2e",
      "name": "Is Email Valid?",
      "type": "n8n-nodes-base.if",
      "position": [
        592,
        16
      ]
    },
    {
      "id": "60fa2cef-9d41-4b44-adbc-5744c1bb5322",
      "name": "Generate Proposal Content",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1040,
        0
      ]
    },
    {
      "id": "0ebd71ef-d701-40db-8db0-3761e03d1337",
      "name": "Prepare Agent Inputs",
      "type": "n8n-nodes-base.set",
      "position": [
        896,
        0
      ]
    },
    {
      "id": "c87a88dc-f047-457e-ab2f-928721c59521",
      "name": "Verify Email Address",
      "type": "n8n-nodes-base.hunter",
      "position": [
        336,
        16
      ]
    },
    {
      "id": "955aa323-1ac0-483d-901e-6a38f9caa3e9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        -912
      ],
      "parameters": {
        "width": 736,
        "height": 672,
        "content": "## Generate PDF Business Proposals with AI\nThis workflow automates the entire sales proposal process, from initial lead capture to final delivery and logging. By combining the power of Google Gemini w"
      }
    }
  ],
  "connections": {
    "Is Email Valid?": {
      "main": [
        [
          {
            "node": "Prepare Agent Inputs",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook simulator": {
      "main": [
        [
          {
            "node": "Verify Email Address",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Agent Inputs": {
      "main": [
        [
          {
            "node": "Generate Proposal Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify Email Address": {
      "main": [
        [
          {
            "node": "Is Email Valid?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Proposal Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Proposal Content": {
      "main": [
        [
          {
            "node": "Convert HTML content to PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert HTML content to PDF": {
      "main": [
        [
          {
            "node": "Send the proposal to the customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send the proposal to the customer": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}