{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "0edf07bf-3b4e-4d78-9155-af2afb01b544",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1296,
        -16
      ],
      "parameters": {
        "name": "={{ new Date().toISOString().split('T')[0] }} - {{ $json.output.clientCompany }} - {{ $json.output.proposalTitle }}",
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "1-NMSCV8bciEywiU5F4vxih7DCiDHu8HeC3m1LEijQ6k"
        },
        "driveId": {
          "__rl": true,
          "mode": "id",
          "value": "19v0fUzeIKVLBqBfQBJ1yK2FPCEPSA5-h"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        },
        "operation": "copy",
        "sameFolder": false
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "14470068-8b64-4d1f-80b1-a73c34c3c264",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        32,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "fa6274bf-faf2-4c0e-b0ad-0a46147c4803",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        944,
        128
      ],
      "parameters": {
        "model": "anthropic/claude-3.5-sonnet",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "74305e91-66af-4226-a258-68ad385450e3",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1088,
        128
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"proposalTitle\": \"B2B Lead Generation and Qualification System\",\n  \"clientName\": \"Sarah Mitchell\",\n  \"clientCompany\": \"TechFlow Solutions\",\n  \"proposalDate\": \"2025-11-09\",\n  \"problem\": \"TechFlow Solutions has low conversion rates. Sales staff spend about 60 percent of their time on unqualified leads. The team has no clear lead generation process, which slows pipeline growth and reduces revenue.\",\n  \"solution\": \"Set up a lead generation system with targeted outreach, automated lead scoring, and CRM integration. Build ideal customer profiles, create outreach sequences, and set clear qualification rules so sales only handles high-intent leads.\",\n  \"goal\": \"Generate at least 150 qualified leads per month with a 25 percent conversion to opportunity. Cut sales qualification time by 50 percent and raise pipeline value by 500000 dollars in the first quarter.\",\n  \"deliverables\": \"ICP documentation and target list with about 500 companies, three automated email sequences with A/B testing, LinkedIn outreach templates, lead scoring model linked to HubSpot CRM, weekly dashboard, and monthly improvement reports.\",\n  \"scope\": \"1. Research and Prospecting\\n- Research UK police trainers and Heads of Development.\\n- Build a lead list of about 200 to 400 trainers and 40 to 50 Heads of Development.\\n2. Outreach Infrastructure\\n- Build multi-touch automated outreach sequences on LinkedIn and email.\\n- Prepare a LinkedIn ad to raise awareness.\\n- Write direct copy for trainers and Heads of Development.\\n3. Engagement and Follow-Up\\n- Set follow-up workflows for LinkedIn and email.\\n- Handover when a prospect replies or books a call.\\n4. Improvement\\n- Adjust messaging based on early results.\\n- Improve campaign results during the 6 to 8 week run.\",\n  \"milestoneOne\": \"Research and Strategy Phase: ICP work, competitor review, messaging structure, and account database setup\",\n  \"milestoneTwo\": \"Campaign Launch: Outreach sequences live, lead scoring active, team trained on qualification steps\",\n  \"milestoneThree\": \"Improvement and Scaling: Review performance data, refine messaging and targeting, increase output on strong channels, prepare final report\",\n  \"timelineOne\": \"Weeks 1 to 2\",\n  \"timelineTwo\": \"Weeks 3 to 4\",\n  \"timelineThree\": \"Weeks 5 to 12\",\n  \"price\": \"1000\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "01674b11-f78e-497e-8e17-26075926a890",
      "name": "Set proposal values",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ff7a5d8d-4392-4c8b-8b23-e023e65a8102",
              "name": "Name company",
              "type": "string",
              "value": "Google"
            },
            {
              "id": "885e4193-a8c2-43d0-8dc7-7b37170dd7d6",
              "name": "Name client",
              "type": "string",
              "value": "Sundar Pichai"
            },
            {
              "id": "cd1390e3-ef29-48ee-967d-42ca7b7f40eb",
              "name": "Problem",
              "type": "string",
              "value": "There is no clear way of generating a proposal at scale"
            },
            {
              "id": "b0c32fe0-0f2d-4c07-8047-b2844b879a56",
              "name": "Solution",
              "type": "string",
              "value": "Proposal generator using n8n"
            },
            {
              "id": "b0592004-add4-4ca4-bf3d-0cf9d14f7e60",
              "name": "Timeline",
              "type": "string",
              "value": "1 week"
            },
            {
              "id": "0751f889-392f-473c-a266-c8e724b7106f",
              "name": "Scope",
              "type": "string",
              "value": "Scope of project is only focused on clients in USA"
            },
            {
              "id": "f1fd5d90-188e-463a-99c7-cea829b01029",
              "name": "Price",
              "type": "string",
              "value": "1000000"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d3dc9867-29a4-4930-821e-b1e33af4780c",
      "name": "Rewrite proposal",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        944,
        -80
      ],
      "parameters": {
        "text": "Your task is to write proposals in a clear professional manner. The tone should be helpful, like a consultant and friendly. Title should be max 4 words\n\nRewrite everything.",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "message": "={{ $json.message.content.toJsonString() }}"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "8683dddf-3993-4022-a356-399460f23880",
      "name": "Create proposal",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        576,
        -80
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=# Prompt\nYou are a helpful, intelligent writing assistant. Your task it to convert the user's input into the following format. Always state the potential benefits and outcome for the client \n\n{\n  \"proposalTitle\": \"\",\n  \"clientName\": \"\",\n  \"clientCompany\": \"\",\n  \"proposalDate\": \"\",\n  \"problem\": \"\",\n  \"solution\": \"\",\n  \"goal\": \"\",\n  \"deliverables\": \"\",\n  \"scope\": \"\",\n  \"milestoneOneName\": \"\",\n  \"milestoneOnePeriod\": \"\",\n  \"milestoneTwoName\": \"\",\n  \"milestoneTwoPeriod\": \"\",\n  \"milestoneThreeName\": \"\",\n  \"milestoneThreePeriod\": \"\",\n  \"quantity\": \"\",\n  \"price\": \"\"\n}\n\n\n\n\n# Rules\n1. Use a spartan, casual tone of voice.\n2. Keep a friendly tone and as a consultant.\n3. Be to-the-point but professional -assume you're writing to a sophisticated audience.\n4. Ensure that all fields are filled out. Do not miss a field or leave any variables empty.\n\n\n"
            },
            {
              "content": "={\n  \"companyName\": \"{{ $json[\"Name company\"] }}\",\n  \"client\":\"{{ $json[\"Name client\"] }}\",\n  \"problem\": \"{{ $json.Problem }}\",\n  \"solution\": \"{{ $json.Solution }}\",\n  \"scope\": \"{{ $json.Scope }}\",\n  \"timeline\": \"{{ $json.Timeline }}\",\n  \"price\": \"{{ $json.Price }}\"\n}"
            },
            {
              "role": "assistant",
              "content": "=Your task is to generate a proposal using input data from a form. This proposal should be highly customized, specific, and high quality. Considering we are going to be sending it immediately after you're done.\n\n\n# Context\nWe are an lead gen go to market agency that develops sales and marketing systems revolving around leadgen, growth and revenue ops, etc.\n\nThe proposal template we're using has many fields. You must return these fields in one JSON object. The tax rate is 21%\n\n\nUse this format:\n\n{\n  \"proposalTitle\": \"B2B Lead Generation & Qualification System\",\n  \"clientName\": \"Sarah Mitchell\",\n  \"clientCompany\": \"TechFlow Solutions\",\n  \"proposalDate\": \"2025-11-09\",\n  \"problem\": \"TechFlow Solutions is experiencing low conversion rates from their current marketing efforts, with sales teams spending 60% of their time on unqualified leads. The lack of a structured lead generation process results in inconsistent pipeline growth and missed revenue opportunities.\",\n  \"solution\": \"Implement a comprehensive lead generation system combining targeted outreach campaigns, automated lead scoring, and CRM integration. This includes building ideal customer profiles, creating multi-channel outreach sequences, and establishing qualification frameworks to ensure sales receives only high-intent prospects.\",\n  \"goal\": \"Generate 150+ qualified leads per month with a minimum 25% conversion-to-opportunity rate, reducing sales team qualification time by 50% and increasing pipeline value by $500K within the first quarter.\",\n  \"deliverables\": \"Complete ICP documentation and target account list (500+ companies), 3 automated email sequences with A/B testing, LinkedIn outreach campaign templates, lead scoring model integrated with HubSpot CRM, weekly performance dashboard, and monthly strategy optimization reports.\",\n  \"scope\": \"1. Research & Prospecting\n- Conduct research on target group UK police trainers and Heads of Development.\n- Build a well-defined lead list of ~200\u2013400 trainers and 40\u201350 Heads of Development.\n2. Outreach Infrastructure\n- Design and build multi-touch automated outreach sequences on LinkedIn and email.\n- Craft a LinkedIn ad to raise awareness and warm up the target audience.\n- Write compelling copy tailored to trainers and Heads of Development to maximize\nengagement.\n3. Engagement & Follow-Up\n- Implement follow-up workflows to maximize engagement on LinkedIn and email.\n- Ensure handover when a prospect responds positively or books a call.\n4. Optimization & Iteration\n- Flexibility to adjust messaging and tactics based on early campaign results.\n- Continuously optimize campaign performance during the 6\u20138 week run\",\n  \"milestoneOne\": \"Research & Strategy Phase: Complete ICP development, competitor analysis, messaging framework, and target account database setup\",\n  \"milestoneTwo\": \"Campaign Launch: Build and deploy outreach sequences, integrate lead scoring system, train team on qualification process\",\n  \"milestoneThree\": \"Optimization & Scaling: Analyze performance data, refine messaging and targeting, scale successful channels, deliver final recommendations\",\n  \"timelineOne\": \"Weeks 1-2\",\n  \"timelineTwo\": \"Weeks 3-4\",\n  \"timelineThree\": \"Weeks 5-12\",\n  \"quantity\": \"1\",\n  \"tax\": \"210\",\n  \"totalPriceInclTax\": \"1210\",\n}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "a53792e2-1dee-4349-9320-9cd6dbfa2c9d",
      "name": "Update proposal",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1632,
        -16
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "{proposalTitle}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.proposalTitle }}"
            },
            {
              "text": "{clientName}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.clientName }}"
            },
            {
              "text": "{clientCompany}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.clientCompany }}"
            },
            {
              "text": "{proposalDate}",
              "action": "replaceAll",
              "replaceText": "={{ $today.format('yyyy-MM-dd') }}"
            },
            {
              "text": "{problem}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.problem }}"
            },
            {
              "text": "{solution}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.solution }}"
            },
            {
              "text": "{goal}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.goal }}"
            },
            {
              "text": "{deliverables}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.deliverables }}"
            },
            {
              "text": "{scope}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.scope }}"
            },
            {
              "text": "{milestoneOneName}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.milestoneOne }}"
            },
            {
              "text": "{milestoneOnePeriod}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.timelineOne }}"
            },
            {
              "text": "{milestoneTwoName}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.milestoneTwo }}"
            },
            {
              "text": "{milestoneTwoPeriod}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.timelineTwo }}"
            },
            {
              "text": "{milestoneThreeName}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.milestoneThree }}"
            },
            {
              "text": "{milestoneThreePeriod}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.timelineThree }}"
            },
            {
              "text": "{price}",
              "action": "replaceAll",
              "replaceText": "={{ $('Rewrite proposal').item.json.output.price }}"
            }
          ]
        },
        "operation": "update",
        "documentURL": "={{ $json.id }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d73f7a05-c4da-4276-b965-be227d32bdc0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -704
      ],
      "parameters": {
        "width": 448,
        "height": 416,
        "content": "## Proposal Generator Node\n\nBelow is a video walkthrough of the Proposal Generator:\n\n[Watch the video](https://waveten.neetorecord.com/watch/bd8c7fc6122a3bc3df25)\n\nThis automated workflow transforms basic proposal inputs into polished, professionally formatted documents in Google Docs.\n\n### Prerequisites\n\nTo use this node, you'll need:\n\n- OpenRouter Account - Required for accessing Claude's rewriting capabilities\n- Templated Google Doc - A pre-formatted document containing variables that match the output fields\n"
      },
      "typeVersion": 1
    },
    {
      "id": "99d2ac3d-2580-46a7-a1ec-b97349ab6cf0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 320,
        "content": "## Manual Input\nYou provide the core proposal values and requirements"
      },
      "typeVersion": 1
    },
    {
      "id": "2cda1d7c-2b8d-4a4f-92ea-e6832ac6642c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 320,
        "content": "## Write Proposal \n\nOpenAI's LLM expands your initial inputs into a detailed, comprehensive proposal draft"
      },
      "typeVersion": 1
    },
    {
      "id": "5fe8a110-8d6b-435c-8293-5161c2b8b808",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 288,
        "height": 464,
        "content": "## Rewrite proposal \n\nOpenRouter's Claude model refines the expanded content, improving clarity, flow, and overall readability"
      },
      "typeVersion": 1
    },
    {
      "id": "e6172168-fde2-4982-9fbf-3d08391074f0",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 368,
        "content": "## Copy Google Doc from Drive\n\nAutomatically copies your templated Google Doc to create a new proposal document"
      },
      "typeVersion": 1
    },
    {
      "id": "16006caf-f994-43f5-847c-4d61b40b2521",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 368,
        "height": 368,
        "content": "## Variable Replacement\n\nIt searches through the copied document and replaces all template variables with the polished content from Claude. \n\nThe formatted proposal is ready in Google Docs\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Google Drive": {
      "main": [
        [
          {
            "node": "Update proposal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create proposal": {
      "main": [
        [
          {
            "node": "Rewrite proposal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update proposal": {
      "main": [
        []
      ]
    },
    "Rewrite proposal": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set proposal values": {
      "main": [
        [
          {
            "node": "Create proposal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Rewrite proposal",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Rewrite proposal",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Set proposal values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}