{
  "id": "4mKIHRtWISNsyOnT",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI proposal",
  "tags": [],
  "nodes": [
    {
      "id": "d70935b1-7828-40cd-86fe-6ed21784c8b5",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -304,
        0
      ],
      "parameters": {
        "options": {},
        "formTitle": "Client Proposal",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Client First Name",
              "requiredField": true
            },
            {
              "fieldLabel": "Client Last Name",
              "requiredField": true
            },
            {
              "fieldType": "email",
              "fieldLabel": "Client Email",
              "requiredField": true
            },
            {
              "fieldLabel": "Client Company Name",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Client Industry",
              "requiredField": true
            },
            {
              "fieldLabel": "Client Website",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Scope",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "Budget",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Problem",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Solution",
              "requiredField": true
            },
            {
              "fieldLabel": "Timeline",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Deliverables",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Generate a proposal for client"
      },
      "typeVersion": 2.2
    },
    {
      "id": "5048a4ac-9ec8-42ca-b219-b07416e15630",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        560,
        0
      ],
      "parameters": {
        "text": "=Your task is to generate structured proposal content for a B2B automation project.\n\nSales Call Summary: {{ $('Get a transcript').item.json.data.summary }}\n\nHere are the client details submitted through the form:\n\nClient First Name: {{ $('On form submission').item.json['Client First Name'] }}\nClient Last Name:  {{ $('On form submission').item.json['Client Last Name'] }}\nClient Email:  {{ $('On form submission').item.json['Client Email'] }}\nClient Website:  {{ $('On form submission').item.json['Client Website'] }}\n\nClient Company Name: {{ $('On form submission').item.json['Client Company Name'] }}\n\nIndustry / Business Context:\nThis client operates in the  {{ $('On form submission').item.json['Client Industry'] }}industry. Tailor your writing tone, examples, and language to reflect this industry\u2019s typical operations, pain points, and workflow challenges.\n\nProject Details:\nScope:  {{ $('On form submission').item.json['Scope'] }}\nProblem:  {{ $('On form submission').item.json.Problem }}\nSolution: {{ $('On form submission').item.json.Solution }}\n\nBudget: {{ $('On form submission').item.json.Budget }}\nTimeline: {{ $('On form submission').item.json.Timeline }}\n\nPlease break scope, deliverables, and timelines into multiple structured parts of if the text suggests multiple items.\n\nPrevious draft if available:{{ $json.draftText }}\n\nPlease use this feeback to update the document and keep this in mind if available- {{ $json.lastFeedback }}. This is most important and please apply the feedback as given. Always change from the previous draft if it's available.",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=Your task is to generate structured proposal content for a B2B automation project. You also have summary from Client Sales call for more context.\n\nPlease break scope, deliverables, and timeline into structured parts. It will be 4 parts for scope and deliverables and 3 for timeline. You will sometimes also receive previous draft text and reviewer feedback. Improve the draft accordingly while keeping structure consistent."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "39679e69-e588-4366-96d7-d1ab0982f67d",
      "name": "Azure OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        560,
        160
      ],
      "parameters": {
        "model": "Open AI",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a536a285-fa50-4562-a315-5047f84c99a8",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        720,
        160
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"introduction\": \"Hi Sarah...\",\n  \"client_problem\": \"You shared that your team is struggling with...\",\n  \"proposed_solution\": \"Automation Jinn will implement...\",\n  \"scope_of_work\": [\n    \"Set up unified CRM automations\",\n    \"Integrate payment \u2192 onboarding workflow\",\n    \"Create reporting dashboards\"\n  ],\n  \"deliverables\": [\n    \"Workflow automation setup\",\n    \"Dashboard buildout\",\n    \"Team training session\"\n  ],\n  \"timeline_breakdown\": [\n    \"Week 1: Discovery & process mapping\",\n    \"Week 2\u20133: Build & integration\",\n    \"Week 4: QA testing & deployment\"\n  ],\n  \"investment\": \"$4,000 one-time automation project\",\n  \"next_steps\": \"Please review and sign the proposal...\"\n}\n"
      },
      "typeVersion": 1.2
    },
    {
      "id": "981dd3a7-3938-4d97-ae08-409250edb49a",
      "name": "Create Document",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1104,
        0
      ],
      "parameters": {
        "url": "https://api.pandadoc.com/public/v1/documents",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"name\": \"Automation Proposal - {{ $('On form submission').item.json['Client First Name'] }} {{ $('On form submission').item.json['Client Last Name'] }}\",\n\n  \"template_uuid\": \"VWJryRNhNZdey4BTLp6XfJ\",\n\n  \"recipients\": [\n    {\n      \"email\": \"{{ $('On form submission').item.json['Client Email'] }}\",\n      \"first_name\": \"{{ $('On form submission').item.json['Client First Name'] }}\",\n      \"last_name\": \"{{ $('On form submission').item.json['Client Last Name'] }}\",\n      \"role\": \"Client\"\n    }\n  ],\n\n  \"tokens\": [\n    {\n      \"name\": \"Client.FirstName\",\n      \"value\": \"{{ $('On form submission').item.json['Client First Name'] }}\"\n    },\n    {\n      \"name\": \"Client.LastName\",\n      \"value\": \"{{ $('On form submission').item.json['Client Last Name'] }}\"\n    },\n    {\n      \"name\": \"Client.Email\",\n      \"value\": \"{{ $('On form submission').item.json['Client Email'] }}\"\n    },\n    {\n      \"name\": \"Client.Company\",\n      \"value\": \"{{ $('On form submission').item.json['Client Company Name'] }}\"\n    },\n    {\n      \"name\": \"client_website\",\n      \"value\": \"{{ $('On form submission').item.json['Client Website'] }}\"\n    },\n\n    {\n      \"name\": \"introduction\",\n      \"value\": \"{{ $json.output.introduction }}\"\n    },\n    {\n      \"name\": \"client_problem\",\n      \"value\": \"{{ $json.output.client_problem }}\"\n    },\n    {\n      \"name\": \"proposed_solution\",\n      \"value\": \"{{ $json.output.proposed_solution }}\"\n    },\n\n   \n    {\n      \"name\": \"scope_1\",\n      \"value\": \"{{ $json.output.scope_of_work[0] }}\"\n    },\n    {\n      \"name\": \"scope_2\",\n      \"value\": \"{{ $json.output.scope_of_work[1] }}\"\n    },\n    {\n      \"name\": \"scope_3\",\n      \"value\": \"{{ $json.output.scope_of_work[2] }}\"\n    },\n{\n      \"name\": \"scope_4\",\n      \"value\": \"{{ $json.output.scope_of_work[3] }}\"\n    },\n  \n    {\n      \"name\": \"deliverable_1\",\n      \"value\": \"{{ $json.output.deliverables[0] }}\"\n    },\n    {\n      \"name\": \"deliverable_2\",\n      \"value\": \"{{ $json.output.deliverables[1] }}\"\n    },\n    {\n      \"name\": \"deliverable_3\",\n      \"value\": \"{{ $json.output.deliverables[2] }}\"\n    },\n{\n      \"name\": \"deliverable_4\",\n      \"value\": \"{{ $json.output.deliverables[3] }}\"\n    },\n\n   \n    {\n      \"name\": \"timeline_1\",\n      \"value\": \"{{ $json.output.timeline_breakdown[0] }}\"\n    },\n    {\n      \"name\": \"timeline_2\",\n      \"value\": \"{{ $json.output.timeline_breakdown[1] }}\"\n    },\n    {\n      \"name\": \"timeline_3\",\n      \"value\": \"{{ $json.output.timeline_breakdown[2] }}\"\n    },\n\n    {\n      \"name\": \"investment\",\n      \"value\": \"{{ $json.output.investment }}\"\n    },\n    {\n      \"name\": \"next_steps\",\n      \"value\": \"{{ $json.output.next_steps }}\"\n    }\n  ],\n\"pricing_tables\": [\n  {\n    \"name\": \"Pricing Table 1\",\n    \"options\": {\n                \"currency\": \"USD\"\n            },\n    \"sections\": [\n      {\n        \"title\": \"Services\",\n        \"default\": true,\n        \"rows\": [\n          {\n            \"options\": {\n              \"optional\": false,\n              \"selected\": false\n            },\n            \"data\": {\n              \"name\": \"Automation & Integration Project\",\n              \"price\": {{ $('On form submission').item.json.Budget }} ,\n              \"qty\": 1\n            }\n          }\n        ]\n      }\n    ]\n  }\n]\n\n \n\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "API-Key <Your API Key>"
            },
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "db219f8f-130f-43a7-807b-13d2388c18df",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1712,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1ff9da4a-b209-41be-ba04-73a57feacb1a",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data['Do you want to approve?'] }}",
              "rightValue": "Approve"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "af28605d-cde4-43a1-9e9d-7247c7860411",
      "name": "Send Document",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2240,
        -16
      ],
      "parameters": {
        "url": "=https://api.pandadoc.com/public/v1/documents/{{ $('Create Document').item.json.id }}/send ",
        "method": "POST",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "API-Key <Your API Key>"
            },
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "42c90063-ed48-40fa-a9de-9c9d44c2fd4a",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        2080,
        -16
      ],
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "b1bcb829-05ee-45c6-b5c1-1f3c269ce826",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -64
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 384,
        "content": "## AI Content Generator for Proposal"
      },
      "typeVersion": 1
    },
    {
      "id": "4ce48e6f-b0e4-4ae8-8216-386e01e5a77f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        -64
      ],
      "parameters": {
        "color": 6,
        "width": 432,
        "height": 256,
        "content": "## Proposal Creation using PandaDoc"
      },
      "typeVersion": 1
    },
    {
      "id": "698427fc-6d8b-4fc0-afd4-019ea34fbd13",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -64
      ],
      "parameters": {
        "color": 3,
        "width": 448,
        "height": 272,
        "content": "## Human Approval using Slack"
      },
      "typeVersion": 1
    },
    {
      "id": "085d8d3b-fb68-42e3-b553-727bba2f7c80",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2032,
        -80
      ],
      "parameters": {
        "color": 5,
        "width": 512,
        "height": 304,
        "content": "## Sending Proposal using PandaDoc"
      },
      "typeVersion": 1
    },
    {
      "id": "a65ddf21-93b8-4a66-8985-a38db112679a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -64
      ],
      "parameters": {
        "width": 224,
        "height": 240,
        "content": "## Form Trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "907c28a8-4264-4f85-ae0d-41254ce19415",
      "name": "Set Initial Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        352,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "be914194-0a63-410a-9a46-966d236163e5",
              "name": "=draftText",
              "type": "string",
              "value": "\"\""
            },
            {
              "id": "ff720644-e46a-468b-b881-30750cf7a2d1",
              "name": "lastFeedback",
              "type": "string",
              "value": "\"\""
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "bbb5c7f2-ba09-46ce-81a5-61471d1e5818",
      "name": "Update Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        1792,
        400
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "57f5c8f4-b513-455e-8a0c-6276147f968a",
              "name": "draftText",
              "type": "string",
              "value": "={{ $('Basic LLM Chain').item.json.output }}"
            },
            {
              "id": "3f3db63f-8bdb-4d4f-b18c-724bce329985",
              "name": "lastFeedback",
              "type": "string",
              "value": "={{ $json.data['If Disapproved, please enter feedback'] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "02f8eb90-d98e-4874-b36c-5bc987e4c42d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2592,
        -96
      ],
      "parameters": {
        "width": 400,
        "height": 304,
        "content": "## Update Contact Stage in CRM"
      },
      "typeVersion": 1
    },
    {
      "id": "a619a018-8e77-4335-9313-85458a65128c",
      "name": "Update Contact",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2736,
        -16
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appd1WfQmSkphzRsw",
          "cachedResultUrl": "https://airtable.com/appd1WfQmSkphzRsw",
          "cachedResultName": "n8n"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblDoulNeDuZe2HtM",
          "cachedResultUrl": "https://airtable.com/appd1WfQmSkphzRsw/tblDoulNeDuZe2HtM",
          "cachedResultName": "CRM"
        },
        "columns": {
          "value": {
            "Email": "={{ $('On form submission').item.json['Client Email'] }}",
            "Stage": "Proposal Sent"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Stage",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Enquiry",
                  "value": "Enquiry"
                },
                {
                  "name": "Call Booked",
                  "value": "Call Booked"
                },
                {
                  "name": "Sales Call Done",
                  "value": "Sales Call Done"
                },
                {
                  "name": "Proposal Sent",
                  "value": "Proposal Sent"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Stage",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "41d5c68e-14d0-4b83-9b9d-b31f52f15afd",
      "name": "Get a list of transcripts",
      "type": "@firefliesai/n8n-nodes-fireflies.fireflies",
      "position": [
        0,
        0
      ],
      "parameters": {
        "filters": {
          "participantEmail": "={{ $json['Client Email'] }}"
        },
        "operation": "getTranscriptsList"
      },
      "credentials": {
        "firefliesApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6211d91a-8943-4534-9214-f643c1339661",
      "name": "Get a transcript",
      "type": "@firefliesai/n8n-nodes-fireflies.fireflies",
      "position": [
        160,
        0
      ],
      "parameters": {
        "transcriptId": "={{ $json.data.id }}"
      },
      "credentials": {
        "firefliesApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7152f8b2-da3c-4e92-b78a-b5c63d7b0d54",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -64
      ],
      "parameters": {
        "color": 2,
        "width": 336,
        "height": 240,
        "content": "## Sales Call Intelligence "
      },
      "typeVersion": 1
    },
    {
      "id": "4f4c03ab-4e50-456d-90d0-4c67b71828dd",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        3504,
        -16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e8d69ec5-f0fa-4a77-94d4-f741595eb9fe",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $json.count }}",
              "rightValue": 9
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bdaf6c30-a0ed-48f4-aefd-299428f6b049",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3072,
        -96
      ],
      "parameters": {
        "color": 6,
        "width": 1328,
        "height": 512,
        "content": "## Follow Up System using Audit Trail"
      },
      "typeVersion": 1
    },
    {
      "id": "7f0909b3-9ec2-4b60-b053-3f7843abe8a4",
      "name": "Get Audit Trail",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3328,
        -16
      ],
      "parameters": {
        "url": "=https://api.pandadoc.com/public/v2/documents/{{ $('Create Document').item.json.id }}/audit-trail",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "API-Key <Your API Key>"
            },
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "07162f6e-eb6e-4832-88f6-eab732547c67",
      "name": "Update Contact1",
      "type": "n8n-nodes-base.airtable",
      "position": [
        4240,
        -32
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appd1WfQmSkphzRsw",
          "cachedResultUrl": "https://airtable.com/appd1WfQmSkphzRsw",
          "cachedResultName": "n8n"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblDoulNeDuZe2HtM",
          "cachedResultUrl": "https://airtable.com/appd1WfQmSkphzRsw/tblDoulNeDuZe2HtM",
          "cachedResultName": "CRM"
        },
        "columns": {
          "value": {
            "Email": "={{ $('On form submission').item.json['Client Email'] }}",
            "Stage": "Reminder Sent"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Stage",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Enquiry",
                  "value": "Enquiry"
                },
                {
                  "name": "Call Booked",
                  "value": "Call Booked"
                },
                {
                  "name": "Sales Call Done",
                  "value": "Sales Call Done"
                },
                {
                  "name": "Proposal Sent",
                  "value": "Proposal Sent"
                },
                {
                  "name": "Reminder Sent",
                  "value": "Reminder Sent"
                },
                {
                  "name": "Document Signed",
                  "value": "Document Signed"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Stage",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "3d2eb51c-efa1-4ad7-9ce8-4414dc7169c2",
      "name": "Update Contact2",
      "type": "n8n-nodes-base.airtable",
      "position": [
        3744,
        192
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appd1WfQmSkphzRsw",
          "cachedResultUrl": "https://airtable.com/appd1WfQmSkphzRsw",
          "cachedResultName": "n8n"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblDoulNeDuZe2HtM",
          "cachedResultUrl": "https://airtable.com/appd1WfQmSkphzRsw/tblDoulNeDuZe2HtM",
          "cachedResultName": "CRM"
        },
        "columns": {
          "value": {
            "Email": "={{ $('On form submission').item.json['Client Email'] }}",
            "Stage": "Document Signed"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Stage",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Enquiry",
                  "value": "Enquiry"
                },
                {
                  "name": "Call Booked",
                  "value": "Call Booked"
                },
                {
                  "name": "Sales Call Done",
                  "value": "Sales Call Done"
                },
                {
                  "name": "Proposal Sent",
                  "value": "Proposal Sent"
                },
                {
                  "name": "Reminder Sent",
                  "value": "Reminder Sent"
                },
                {
                  "name": "Document Signed",
                  "value": "Document Signed"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Stage",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "b48039fa-decc-4d0f-b9c4-b0b21dc228b6",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        3168,
        -16
      ],
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "96820982-f817-423f-99ea-9e972885bf4f",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        -208
      ],
      "parameters": {
        "width": 816,
        "height": 752,
        "content": "## AI Proposal Workflow Overview( By Sparsh from Automation Jinn www.automationjinn.com)\n\nTurn **sales calls + intake forms** into **send-ready proposals \u2014 fast and consistent**.\n\n### What this workflow does\n1\ufe0f\u20e3 You submit the form to generate the prooposal \u2192 goals, budget, timeline  \n2\ufe0f\u20e3 Transcript is pulled from Fireflies \n3\ufe0f\u20e3 LLM creates a **structured proposal draft** (problem \u2192 solution \u2192 scope \u2192 budget \u2192 timeline \u2192 next steps)  \n4\ufe0f\u20e3 PandaDoc generates the proposal from your template  \n5\ufe0f\u20e3 **Slack approval loop**  \n   - Approve \u2192 send automatically  \n   - Request changes \u2192 AI regenerates draft and loops back for approval( loops until perfect)\n6\ufe0f\u20e3 CRM updates stage to **Proposal Sent**  \n7\ufe0f\u20e3 Follow-up automation uses PandaDoc audit trail  \n   - If not signed in 48h \u2192 reminder + CRM update  \n   - If signed \u2192 CRM \u2192 **Closed Won**\n\n### Who this is perfect for\n- Agencies & consultants  \n- Business creating proposals manualy\n- B2B SaaS & tech service teams  \n- Solo operators who want proposals out **within hours, not days**\n\n### Why teams love it\n- 100% reusable \u2192 swap Fireflies, PandaDoc, HubSpot, Slack, etc. without changing core logic  \n- Faster turnaround = **more closed deals**  \n- Zero manual follow-ups\n\n**Outcome:** sales stays focused on selling \u2014 not writing proposals, chasing approvals, or nudging clients to sign.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4206d8c2-025f-4b64-8a56-534e4eb56494",
      "name": "Send a message and wait for response",
      "type": "n8n-nodes-base.slack",
      "position": [
        1520,
        0
      ],
      "parameters": {
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U09U6MMQ7H8",
          "cachedResultName": "sparsh"
        },
        "message": "=Check the Proposal generated by AI- https://app.pandadoc.com/a/#/documents/{{ $json.id }}",
        "options": {},
        "operation": "sendAndWait",
        "formFields": {
          "values": [
            {
              "fieldType": "radio",
              "fieldLabel": "Do you want to approve?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Approve"
                  },
                  {
                    "option": "Disapprove"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "If Disapproved, please enter feedback"
            }
          ]
        },
        "responseType": "customForm"
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "b6615cb9-9b83-4955-aba3-7dcb522d0c41",
      "name": "Send Reminder1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3888,
        -32
      ],
      "parameters": {
        "url": "=https://api.pandadoc.com/public/v1/documents/{{ $('Create Document').item.json.id }}/send-reminder",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"reminders\": [\n    {\n      \"recipient_id\": \"{{ $json.recipients[0].id }}\",\n      \"delivery_methods\": {\n        \"email\": true,\n        \"sms\": false\n      }\n    }\n  ]\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "API-Key <Your API Key>"
            },
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "670b9618-7fe1-4f64-bcf7-7716fea17580",
      "name": "Get Recepient ID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3712,
        -32
      ],
      "parameters": {
        "url": "=https://api.pandadoc.com/public/v1/documents/{{ $('Create Document').item.json.id }}/details",
        "options": {},
        "jsonBody": "{ \"reminders\": [\n    {\n      \"delivery_methods\": {\n        \"email\": true\n      }\n    }\n  ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "API-Key <Your API Key>"
            },
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c2924bfe-d275-4dbb-82ea-792bfed047e9",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        4064,
        -32
      ],
      "parameters": {
        "text": "=Have send the reminder to the client as the document(https://app.pandadoc.com/a/#/documents/{{ $('Send Document').item.json.id }}) is not completed even after 48 hours.",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U09U6MMQ7H8",
          "cachedResultName": "sparsh"
        },
        "select": "user",
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "typeVersion": 2.3
    },
    {
      "id": "f2863357-04ce-40d8-bf31-4b568a63ac53",
      "name": "Send a message1",
      "type": "n8n-nodes-base.slack",
      "position": [
        2416,
        -16
      ],
      "parameters": {
        "text": "=I have sent the proposal for Client-  {{ $json.recipients[0].first_name }} from {{ $('On form submission').item.json['Client Company Name'] }}",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U09U6MMQ7H8",
          "cachedResultName": "sparsh"
        },
        "select": "user",
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5371652e-847d-4fd0-9d76-71eef3575af4",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Get Recepient ID",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Contact2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Send Document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Get Audit Trail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Document": {
      "main": [
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Reminder1": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Update Contact1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Contact": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Create Document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Document": {
      "main": [
        [
          {
            "node": "Send a message and wait for response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Audit Trail": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message1": {
      "main": [
        [
          {
            "node": "Update Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Recepient ID": {
      "main": [
        [
          {
            "node": "Send Reminder1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a transcript": {
      "main": [
        [
          {
            "node": "Set Initial Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Variables": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Get a list of transcripts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Initial Variables": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Get a list of transcripts": {
      "main": [
        [
          {
            "node": "Get a transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message and wait for response": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}