diff --git a/workflows/Generate & Deliver Invoices from JotForm to Google Drive & Email with PDF Conversion-9447/generate_deliver_invoices_from_jotform_to_google_drive_email_with_pdf_conversion.json b/workflows/Generate & Deliver Invoices from JotForm to Google Drive & Email with PDF Conversion-9447/generate_deliver_invoices_from_jotform_to_google_drive_email_with_pdf_conversion.json
new file mode 100644
index 000000000..0f80b3b22
--- /dev/null
+++ b/workflows/Generate & Deliver Invoices from JotForm to Google Drive & Email with PDF Conversion-9447/generate_deliver_invoices_from_jotform_to_google_drive_email_with_pdf_conversion.json
@@ -0,0 +1 @@
+{"id":"Rrs4ZCaJZKAZIHKG","meta":{"instanceId":"277842713620d9f5554de3b1518b865a152c8c4db680008bd8aec536fc18b4a8"},"name":"Automated Invoice Generation & Delivery for JotForm Orders","tags":[{"id":"CWardZYJBmejoyC4","name":"under review","createdAt":"2025-10-09T18:43:37.031Z","updatedAt":"2025-10-09T18:43:37.031Z"}],"nodes":[{"id":"99ab3063-af31-4701-890f-67b42ed901f6","name":"Format Invoice Data","type":"n8n-nodes-base.code","position":[-160,496],"parameters":{"jsCode":"// Extract and format order data for invoice\nconst orderData = $input.first().json.body;\n\n// Calculate totals\nconst lineItems = orderData.line_items.map(item => ({\n name: item.name,\n quantity: item.quantity,\n price: parseFloat(item.price),\n total: parseFloat(item.price) * item.quantity,\n sku: item.sku || 'N/A'\n}));\n\nconst subtotal = lineItems.reduce((sum, item) => sum + item.total, 0);\nconst taxAmount = parseFloat(orderData.total_tax || 0);\nconst shippingAmount = parseFloat(orderData.shipping_lines?.[0]?.price || 0);\nconst total = parseFloat(orderData.total_price);\n\n// Format invoice data\nconst invoiceData = {\n // Order info\n orderNumber: orderData.order_number,\n orderDate: new Date(orderData.created_at).toLocaleDateString(),\n \n // Customer info\n customer: {\n name: `${orderData.customer.first_name} ${orderData.customer.last_name}`,\n email: orderData.customer.email,\n phone: orderData.customer.phone || 'N/A'\n },\n \n // Billing address\n billingAddress: orderData.billing_address ? {\n address1: orderData.billing_address.address1,\n address2: orderData.billing_address.address2 || '',\n city: orderData.billing_address.city,\n province: orderData.billing_address.province,\n zip: orderData.billing_address.zip,\n country: orderData.billing_address.country\n } : null,\n \n // Shipping address\n shippingAddress: orderData.shipping_address ? {\n address1: orderData.shipping_address.address1,\n address2: orderData.shipping_address.address2 || '',\n city: orderData.shipping_address.city,\n province: orderData.shipping_address.province,\n zip: orderData.shipping_address.zip,\n country: orderData.shipping_address.country\n } : null,\n \n // Line items\n items: lineItems,\n \n // Totals\n subtotal: subtotal.toFixed(2),\n tax: taxAmount.toFixed(2),\n shipping: shippingAmount.toFixed(2),\n total: total.toFixed(2),\n currency: orderData.currency,\n \n // Additional info\n paymentMethod: orderData.payment_gateway_names?.[0] || 'Online Payment',\n notes: orderData.note || ''\n};\n\nreturn { invoiceData };"},"typeVersion":2},{"id":"0bfdcf22-ecc4-4fb1-b9a7-5ee86079feb1","name":"Generate HTML Invoice","type":"n8n-nodes-base.code","position":[144,496],"parameters":{"jsCode":"// Generate professional invoice HTML\nconst data = $input.first().json.invoiceData;\n\nconst html = `\n\n\n
\n \n \n Invoice #${data.orderNumber}\n \n\n\n \n \n \n
\n
\n
Bill To:
\n
\n ${data.customer.name}
\n ${data.customer.email}
\n ${data.customer.phone}
\n ${data.billingAddress ? `\n ${data.billingAddress.address1}
\n ${data.billingAddress.address2 ? data.billingAddress.address2 + '
' : ''}\n ${data.billingAddress.city}, ${data.billingAddress.province} ${data.billingAddress.zip}
\n ${data.billingAddress.country}\n ` : ''}\n
\n
\n \n ${data.shippingAddress ? `\n
\n
Ship To:
\n
\n ${data.shippingAddress.address1}
\n ${data.shippingAddress.address2 ? data.shippingAddress.address2 + '
' : ''}\n ${data.shippingAddress.city}, ${data.shippingAddress.province} ${data.shippingAddress.zip}
\n ${data.shippingAddress.country}\n
\n
\n ` : ''}\n \n
\n
Payment Info:
\n
\n Method: ${data.paymentMethod}
\n Currency: ${data.currency}
\n Status: Paid\n
\n
\n
\n \n
\n \n \n | Item | \n SKU | \n Qty | \n Price | \n Total | \n
\n \n \n ${data.items.map(item => `\n \n | ${item.name} | \n ${item.sku} | \n ${item.quantity} | \n $${item.price.toFixed(2)} | \n $${item.total.toFixed(2)} | \n
\n `).join('')}\n \n
\n \n
\n
\n \n | Subtotal: | \n $${data.subtotal} | \n
\n ${parseFloat(data.shipping) > 0 ? `\n \n | Shipping: | \n $${data.shipping} | \n
\n ` : ''}\n ${parseFloat(data.tax) > 0 ? `\n \n | Tax: | \n $${data.tax} | \n
\n ` : ''}\n \n | Total: | \n $${data.total} | \n
\n
\n
\n \n ${data.notes ? `\n
\n Notes:
\n ${data.notes}\n
\n ` : ''}\n \n \n
\n\n\n`;\n\nreturn { html };"},"typeVersion":2},{"id":"9cedf436-1a03-4fb6-910d-086b6dca81b5","name":"Save to Google Drive","type":"n8n-nodes-base.googleDrive","position":[1056,288],"parameters":{"name":"=Invoice - {{ $('Shopify Order Webhook').item.json.body.id }}","driveId":{"__rl":true,"mode":"list","value":"My Drive"},"options":{},"folderId":{"__rl":true,"mode":"list","value":"1A2B3C4D5E6F7G8H9I0J","cachedResultName":"Invoices"}},"typeVersion":3},{"id":"cfc5e050-ca7f-4197-aec2-efea24529538","name":"Email to Customer","type":"n8n-nodes-base.gmail","position":[1056,592],"webhookId":"fd101041-8325-4589-a347-d966678a2883","parameters":{"sendTo":"={{ $('Shopify Order Webhook').item.json.body.customer.email }}","message":"= Invoice for Order #{{ $('Shopify Order Webhook').item.json.body.order_number }} Dear {{ $('Shopify Order Webhook').item.json.body.customer.first_name }},
Thank you for your recent order! Your payment has been successfully processed.
š Invoice Attached
Please find your invoice attached to this email for order #{{ $('Shopify Order Webhook').item.json.body.order_number }}.
We're now preparing your order for shipment. You'll receive a tracking notification once your order is on its way.
If you have any questions about your order, please don't hesitate to contact us at support@pdfmunk.com.
Thank you for choosing Company Name!
Best regards,
The Company Name Team
","options":{"attachmentsUi":{"attachmentsBinary":[{}]}},"subject":"=Invoice for your Order# {{ $('Shopify Order Webhook').item.json.body.order_number }}"},"typeVersion":2.1},{"id":"8162eb8b-938d-4361-b54d-e745984ba8b1","name":"Generate PDF Invoice","type":"n8n-nodes-htmlcsstopdf.htmlcsstopdf","position":[512,496],"parameters":{},"typeVersion":1},{"id":"23581c69-fd48-49a9-abe8-8f3efb1bcc9e","name":"Download File PDF","type":"n8n-nodes-base.httpRequest","position":[800,496],"parameters":{"url":"={{ $json.pdf_url }}","options":{}},"typeVersion":4.2},{"id":"6ff41885-733c-4e38-b16b-3e9f3adae96b","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-592,288],"parameters":{"color":4,"width":288,"height":368,"content":"## Webhook from Jotform\nSetup this webhook URL to receive order information from Jotform\n\n**JotForm account**\n\n[Sign up for Jotform for free](https://www.jotform.com/?partner=mediajade)"},"typeVersion":1},{"id":"5ddc5e49-007b-4a46-a41a-e7f5a50c2679","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[80,384],"parameters":{"color":4,"height":272,"content":"## Create HTML\nGenerate custom HTML for the invoice"},"typeVersion":1},{"id":"989e9a89-dcd8-42fb-9fa6-c20916ef42f5","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[384,384],"parameters":{"color":4,"width":352,"height":272,"content":"## Generate PDF\n* Convert HTML to PDF Invoice\n* Get your API Key from [PDFMunk](https://pdfmunk.com)"},"typeVersion":1},{"id":"8aeeed1b-3c2f-44de-a330-2547f2d1a3bd","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-224,384],"parameters":{"color":4,"height":272,"content":"## Format Data\nPrepare Line Item data for next step"},"typeVersion":1},{"id":"db3b1636-c5c8-4212-8cfa-8a1d4e21410e","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[960,576],"parameters":{"color":4,"width":304,"height":288,"content":"\n\n\n\n\n\n\n\n\n\n\n\n## Email Invoice\nSend Invoice PDF Email to the Customer"},"typeVersion":1},{"id":"6d92f3cf-4574-44af-b88a-e309974f809b","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[960,192],"parameters":{"color":4,"width":304,"height":288,"content":"## Save Invoice PDF\nStore Invoice PDF to Google Drive"},"typeVersion":1},{"id":"bfc8cada-2bd0-485f-a9b5-4d1701474374","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[0,0],"parameters":{"color":6,"width":544,"height":288,"content":"## šÆ What This Template Does\n\nTransform your Jotform order fulfillment with complete invoice automation. When a customer places an order, this workflow automatically:\n\nā
Receives order data from Jotform Trigger\nā
Generates professional HTML invoice with your branding\nā
Converts to PDF using HTML to PDF conversion\nā
Saves invoice to Google Drive for record-keeping\nā
Emails PDF invoice to customer automatically"},"typeVersion":1},{"id":"000cdfd3-ae0d-4716-9ca9-ef155ff6c3ec","name":"JotForm Trigger","type":"n8n-nodes-base.jotFormTrigger","position":[-512,496],"webhookId":"d222ca8c-80f7-4504-bf39-6b2e5ec87316","parameters":{"form":"252815424602048"},"credentials":{"jotFormApi":{"id":"cOSh16Q5l4e0EB1A","name":"Jotform jitesh@mediajade.com"}},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"4eaaebd6-4d7c-4c24-bde6-4553f7978a77","connections":{"JotForm Trigger":{"main":[[{"node":"Format Invoice Data","type":"main","index":0}]]},"Download File PDF":{"main":[[{"node":"Email to Customer","type":"main","index":0},{"node":"Save to Google Drive","type":"main","index":0}]]},"Email to Customer":{"main":[[]]},"Format Invoice Data":{"main":[[{"node":"Generate HTML Invoice","type":"main","index":0}]]},"Generate PDF Invoice":{"main":[[{"node":"Download File PDF","type":"main","index":0}]]},"Save to Google Drive":{"main":[[]]},"Generate HTML Invoice":{"main":[[{"node":"Generate PDF Invoice","type":"main","index":0}]]}}}
\ No newline at end of file