{"product_id":"verify-tax-ids-from-pdf-uploads-n8n-groq-sheets-gmail","title":"Verify Tax IDs from PDF Uploads: n8n + Groq + Sheets + Gmail","description":"\u003ch3\u003eAutomatically verify tax IDs from uploaded PDF documents—then log, email, and return a JSON verdict\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow accepts PDF uploads via a Lovable webhook, extracts the Tax ID using Groq, validates it against a Google Sheets “TaxID_Database,” emails the submitter through Gmail, records an audit trail in Sheets, and returns a final compliance verdict back to Lovable as JSON.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives uploads via Webhook:\u003c\/strong\u003e A POST webhook from Lovable sends a base64-encoded PDF plus submitter metadata.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDeduplicates repeated submissions:\u003c\/strong\u003e It generates a request ID, normalizes incoming fields, and checks Google Sheets “Verification_Log” for a recent run with the same filename to return a cached duplicate result.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts Tax ID from the PDF:\u003c\/strong\u003e If not a duplicate, it extracts readable text from the PDF payload and sends it to \u003cstrong\u003eGroq (OpenAI-compatible chat completions)\u003c\/strong\u003e to parse the Tax ID and document details as JSON.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHandles missing Tax IDs:\u003c\/strong\u003e If Groq cannot extract a Tax ID, the workflow immediately returns a JSON error response to Lovable.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates and matches:\u003c\/strong\u003e It normalizes the extracted Tax ID format, looks it up in \u003cstrong\u003eGoogle Sheets “TaxID_Database”\u003c\/strong\u003e, and determines match score, entity mismatch, and a preliminary verification status.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProduces a final verdict:\u003c\/strong\u003e The workflow sends verification facts back to Groq to generate a final compliance verdict with risk level, score, flags, summary, and recommended action.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAudits, notifies, and responds:\u003c\/strong\u003e It appends the full verification audit record to Google Sheets, updates matched\/unknown entries, emails the submitter via \u003cstrong\u003eGmail\u003c\/strong\u003e, and returns the final JSON result to Lovable.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS onboarding that needs automated \u003cstrong\u003etax ID verification from PDF uploads\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eRisk screening workflows where mismatches must be logged and communicated to users.\u003c\/li\u003e\n  \u003cli\u003eOperational audit trails for compliance teams using Google Sheets as a lightweight database.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes:\u003c\/strong\u003e \u003ccode\u003ewebhook\u003c\/code\u003e, \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eswitch\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003egmail\u003c\/code\u003e, and \u003ccode\u003esticky note\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLLM parsing:\u003c\/strong\u003e Groq (OpenAI-compatible chat completions) to extract Tax IDs and generate a compliance verdict.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eData storage \u0026amp; lookup:\u003c\/strong\u003e Google Sheets tables “TaxID_Database” and “Verification_Log”.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturn format:\u003c\/strong\u003e JSON verdict response back to Lovable.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45785756172467,"sku":"N8N-17894","price":22.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/pT9q77RQibs-9aoK3ZRDO_0NKwiBcG.png?v=1786180564","url":"https:\/\/buyflowscripts.com\/products\/verify-tax-ids-from-pdf-uploads-n8n-groq-sheets-gmail","provider":"N8N Commerce","version":"1.0","type":"link"}