{"product_id":"n8n-workflow-compare-supplier-contracts-with-gemini-gmail","title":"n8n Workflow: Compare Supplier Contracts with Gemini \u0026 Gmail","description":"\u003ch3\u003eCompare Supplier Contract PDFs Automatically—with Gemini + Gmail Draft Pushback\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow takes a newly uploaded supplier agreement PDF, extracts the commercial terms with \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e, compares them against the last accepted baseline stored in n8n static data, and—when anything changes—creates a \u003cstrong\u003eGmail draft\u003c\/strong\u003e with pushback lines for negotiation.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eStarts with an \u003cstrong\u003en8n Form trigger\u003c\/strong\u003e that receives a supplier PDF upload and an agreement name.\u003c\/li\u003e\n  \u003cli\u003eValidates the upload, normalizes the agreement name into a consistent lookup key, and captures optional annual spend and whether this version should become the new accepted baseline.\u003c\/li\u003e\n  \u003cli\u003eUses \u003cstrong\u003eGoogle Gemini (PaLM)\u003c\/strong\u003e to read the PDF and extract \u003cstrong\u003eline prices and commercial terms\u003c\/strong\u003e as \u003cstrong\u003estructured JSON\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eCompares the extracted terms to the stored baseline for that agreement, calculating `price deltas` and identifying terms that were \u003cstrong\u003eadded\u003c\/strong\u003e, \u003cstrong\u003echanged\u003c\/strong\u003e, or \u003cstrong\u003eremoved\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eIf the agreement name is seen for the first time, it stores the extracted terms as the baseline and shows a \u003cstrong\u003e“baseline recorded”\u003c\/strong\u003e confirmation page.\u003c\/li\u003e\n  \u003cli\u003eIf nothing changed, it shows a \u003cstrong\u003e“no change found”\u003c\/strong\u003e confirmation page.\u003c\/li\u003e\n  \u003cli\u003eIf changes are detected, Gemini summarizes what worsened (beyond price) and proposes pushback wording; the workflow then creates a \u003cstrong\u003eGmail draft\u003c\/strong\u003e and displays a results page with the full diff and whether the baseline was updated.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eOngoing supplier renegotiations: upload revised contract PDFs and immediately see what changed.\u003c\/li\u003e\n  \u003cli\u003eProcurement review workflows: automatically flag added\/removed commercial terms before approving.\u003c\/li\u003e\n  \u003cli\u003eFast negotiation drafting: generate a ready-to-edit Gmail email draft with Gemini-based pushback lines.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Gemini (PaLM)\u003c\/strong\u003e: contract extraction and structured JSON term extraction + change summarization.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGmail OAuth2\u003c\/strong\u003e: creates \u003cstrong\u003eemail drafts\u003c\/strong\u003e when differences are found.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n static data\u003c\/strong\u003e: persists the last accepted baseline per normalized agreement name.\u003c\/li\u003e\n  \u003cli\u003eWorkflow nodes: \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eform\u003c\/strong\u003e, \u003cstrong\u003egmail\u003c\/strong\u003e, \u003cstrong\u003eswitch\u003c\/strong\u003e, \u003cstrong\u003esticky note\u003c\/strong\u003e, \u003cstrong\u003eform trigger\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45824201326771,"sku":"N8N-18179","price":23.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/veJRlqJpSc_3jiwwZ2L4k_siRy8fhz.png?v=1786611979","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-compare-supplier-contracts-with-gemini-gmail","provider":"N8N Commerce","version":"1.0","type":"link"}