{
  "name": "proposal-assistant-claude",
  "nodes": [
    {
      "id": "d4e5f6a7-0001-4000-8000-000000000001",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        300
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "proposal-assistant",
        "responseMode": "onReceived",
        "options": {}
      }
    },
    {
      "id": "d4e5f6a7-0002-4000-8000-000000000002",
      "name": "Generate Proposal",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1,
      "position": [
        220,
        300
      ],
      "parameters": {
        "model": "claude-3-5-sonnet-20241022",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a professional proposal writer for a consulting or freelance services business. Generate a clean, structured proposal from the discovery notes provided. Format the output as a professional document with these sections:\n\n1. Executive Summary (2-3 sentences)\n2. Problem Statement (what the client is dealing with)\n3. Proposed Solution (what you will deliver)\n4. Scope of Work (bulleted deliverables)\n5. Timeline (phases with durations)\n6. Investment (price range or fixed price)\n7. Next Steps (single clear call to action)\n\nWrite in second person. No em-dashes. Keep total length under 500 words."
            },
            {
              "role": "user",
              "content": "Client name: {{ $json.client_name }}\nCompany: {{ $json.client_company }}\nContact role: {{ $json.contact_role }}\nBudget range: {{ $json.budget_range }}\nTimeline expectation: {{ $json.timeline }}\n\nDiscovery notes:\n{{ $json.discovery_notes }}"
            }
          ]
        }
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "d4e5f6a7-0003-4000-8000-000000000003",
      "name": "Parse Proposal",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        440,
        300
      ],
      "parameters": {
        "mode": "manual",
        "fields": {
          "values": [
            {
              "name": "proposal_text",
              "type": "expression",
              "value": "={{ $json.message.content[0].text }}"
            },
            {
              "name": "client_name",
              "type": "expression",
              "value": "={{ $('Webhook Trigger').item.json.client_name }}"
            },
            {
              "name": "client_company",
              "type": "expression",
              "value": "={{ $('Webhook Trigger').item.json.client_company }}"
            },
            {
              "name": "budget_range",
              "type": "expression",
              "value": "={{ $('Webhook Trigger').item.json.budget_range }}"
            },
            {
              "name": "approver_email",
              "type": "expression",
              "value": "={{ $('Webhook Trigger').item.json.approver_email }}"
            }
          ]
        }
      }
    },
    {
      "id": "d4e5f6a7-0004-4000-8000-000000000004",
      "name": "Save to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        660,
        300
      ],
      "parameters": {
        "operation": "create",
        "name": "={{ 'Proposal - ' + $json.client_company + ' - ' + new Date().toISOString().split('T')[0] }}",
        "driveId": {
          "value": "MY_DRIVE"
        },
        "folderId": {
          "value": "YOUR_PROPOSALS_FOLDER_ID"
        },
        "content": "={{ $json.proposal_text }}",
        "mimeType": "text/plain"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "d4e5f6a7-0005-4000-8000-000000000005",
      "name": "Request Approval via Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        880,
        300
      ],
      "parameters": {
        "operation": "post",
        "select": "channel",
        "channelId": {
          "value": "#proposals"
        },
        "text": "New proposal ready for review.\nClient: {{ $('Parse Proposal').item.json.client_name }} at {{ $('Parse Proposal').item.json.client_company }}\nBudget: {{ $('Parse Proposal').item.json.budget_range }}\n\nProposal saved to Google Drive. Reply with 'approve' or 'revise' to proceed.",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Generate Proposal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Proposal": {
      "main": [
        [
          {
            "node": "Parse Proposal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Proposal": {
      "main": [
        [
          {
            "node": "Save to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Google Drive": {
      "main": [
        [
          {
            "node": "Request Approval via Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 1,
  "updatedAt": "2026-05-17T00:00:00.000Z",
  "versionId": "v1"
}