{
 "name": "Quote request form to draft PDF quote emailed to owner (AutomateRecipes)",
 "nodes": [
  {
   "parameters": {
    "formTitle": "Request a quote",
    "formFields": {
     "values": [
      {
       "fieldLabel": "Name",
       "requiredField": true
      },
      {
       "fieldLabel": "Email",
       "fieldType": "email",
       "requiredField": true
      },
      {
       "fieldLabel": "Service",
       "requiredField": true
      },
      {
       "fieldLabel": "Details",
       "fieldType": "textarea"
      }
     ]
    },
    "options": {}
   },
   "id": "8d006735-2875-5571-b5f5-d6ebf550a3a9",
   "name": "Quote request form",
   "type": "n8n-nodes-base.formTrigger",
   "typeVersion": 2.2,
   "position": [
    0,
    0
   ]
  },
  {
   "parameters": {
    "operation": "copy",
    "fileId": {
     "__rl": true,
     "mode": "url",
     "value": "https://docs.google.com/document/d/YOUR_TEMPLATE_DOC_ID/edit"
    },
    "name": "=Quote - {{ $json.Name }} - {{ $now.toFormat('yyyy-MM-dd') }}",
    "options": {}
   },
   "id": "36d73010-f66a-5d6b-94b8-a8a686be6f3f",
   "name": "Drive: copy quote template",
   "type": "n8n-nodes-base.googleDrive",
   "typeVersion": 3,
   "position": [
    220,
    0
   ],
   "credentials": {
    "googleDriveOAuth2Api": {
     "id": "",
     "name": "YOUR_GOOGLEDRIVEOAUTH2API_CREDENTIAL"
    }
   }
  },
  {
   "parameters": {
    "operation": "update",
    "documentURL": "={{ $json.id }}",
    "actionsUi": {
     "actionFields": [
      {
       "action": "replaceAll",
       "text": "{{NAME}}",
       "replaceText": "={{ $('Quote request form').item.json.Name }}"
      },
      {
       "action": "replaceAll",
       "text": "{{SERVICE}}",
       "replaceText": "={{ $('Quote request form').item.json.Service }}"
      },
      {
       "action": "replaceAll",
       "text": "{{DETAILS}}",
       "replaceText": "={{ $('Quote request form').item.json.Details }}"
      }
     ]
    }
   },
   "id": "b447ee5f-376d-5751-b481-64bcde5faf5c",
   "name": "Docs: fill placeholders",
   "type": "n8n-nodes-base.googleDocs",
   "typeVersion": 2,
   "position": [
    440,
    0
   ],
   "credentials": {
    "googleDocsOAuth2Api": {
     "id": "",
     "name": "YOUR_GOOGLEDOCSOAUTH2API_CREDENTIAL"
    }
   }
  },
  {
   "parameters": {
    "operation": "download",
    "fileId": {
     "__rl": true,
     "mode": "id",
     "value": "={{ $('Drive: copy quote template').item.json.id }}"
    },
    "options": {
     "googleFileConversion": {
      "conversion": {
       "docsToFormat": "application/pdf"
      }
     }
    }
   },
   "id": "633f1f1d-0a0b-5a2b-a278-3b1ad30d8ea4",
   "name": "Drive: download as PDF",
   "type": "n8n-nodes-base.googleDrive",
   "typeVersion": 3,
   "position": [
    660,
    0
   ],
   "credentials": {
    "googleDriveOAuth2Api": {
     "id": "",
     "name": "YOUR_GOOGLEDRIVEOAUTH2API_CREDENTIAL"
    }
   }
  },
  {
   "parameters": {
    "sendTo": "YOUR_EMAIL@example.com",
    "subject": "=Draft quote for {{ $('Quote request form').item.json.Name }} - please review",
    "emailType": "text",
    "message": "=New quote request from {{ $('Quote request form').item.json.Name }} ({{ $('Quote request form').item.json.Email }}). Draft PDF attached - check prices before sending.",
    "options": {
     "attachmentsUi": {
      "attachmentsBinary": [
       {
        "property": "data"
       }
      ]
     }
    }
   },
   "id": "59d0defe-037e-5c49-8ba8-2a2d98b780fc",
   "name": "Gmail: send draft to owner",
   "type": "n8n-nodes-base.gmail",
   "typeVersion": 2.1,
   "position": [
    880,
    0
   ],
   "credentials": {
    "gmailOAuth2": {
     "id": "",
     "name": "YOUR_GMAILOAUTH2_CREDENTIAL"
    }
   }
  }
 ],
 "connections": {
  "Quote request form": {
   "main": [
    [
     {
      "node": "Drive: copy quote template",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Drive: copy quote template": {
   "main": [
    [
     {
      "node": "Docs: fill placeholders",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Docs: fill placeholders": {
   "main": [
    [
     {
      "node": "Drive: download as PDF",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Drive: download as PDF": {
   "main": [
    [
     {
      "node": "Gmail: send draft to owner",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "executionOrder": "v1"
 },
 "active": false,
 "pinData": {},
 "meta": {
  "note": "Replace YOUR_* placeholders and attach your own credentials. Not tested on real services."
 }
}