{"product_id":"square-invoice-subscription-builder-from-text-gpt-4o-mini","title":"Square Invoice \u0026 Subscription Builder from Text (GPT-4o Mini)","description":"\u003ch3\u003eTurn plain text invoice requests into Square invoices (and subscriptions) automatically\u003c\/h3\u003e\n\u003cp\u003eThe \u003cstrong\u003eSquare Invoice \u0026amp; Subscription Builder from Text (GPT-4o Mini)\u003c\/strong\u003e sub-workflow takes invoice details written in plain language, uses \u003cstrong\u003eOpenAI (GPT-4o-mini)\u003c\/strong\u003e to normalize them, then calls the \u003cstrong\u003eSquare API\u003c\/strong\u003e to \u003cstrong\u003efind or create the customer\u003c\/strong\u003e, \u003cstrong\u003ecreate and publish an email-delivered invoice\u003c\/strong\u003e, and—when requested—\u003cstrong\u003eset up a monthly subscription\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cp\u003eDesigned for n8n workflow chains, this sub-workflow receives invoice fields from a parent workflow via an \u003cstrong\u003eExecute Workflow\u003c\/strong\u003e trigger and performs these steps:\u003c\/p\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAccepts invoice fields\u003c\/strong\u003e: name, email, item, amount, notes, recurring flag (e.g., Monthly), and date.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses OpenAI structured output\u003c\/strong\u003e (GPT-4o-mini) to clean and normalize the invoice data, including converting the date to \u003cstrong\u003eYYYY-MM-DD\u003c\/strong\u003e and generating a unique invoice number.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFinds or creates a Square customer\u003c\/strong\u003e by searching customers using the email address.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eChecks customer profile\u003c\/strong\u003e to determine whether the customer has a card on file.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCreates a Square order\u003c\/strong\u003e, then \u003cstrong\u003ecreates and publishes a Square invoice\u003c\/strong\u003e configured for \u003cstrong\u003eemail delivery\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOptionally creates a monthly subscription\u003c\/strong\u003e: if the invoice is marked as Monthly, it creates a Square subscription plan and plan variation and attaches it to the customer.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturns results\u003c\/strong\u003e: if not recurring, it returns the \u003cstrong\u003epublished invoice public URL\u003c\/strong\u003e to the parent workflow.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eGenerate Square invoices from support tickets or intake forms that contain invoice details in free text.\u003c\/li\u003e\n  \u003cli\u003eCreate subscription invoices for “monthly” customers without manual Square setup.\u003c\/li\u003e\n  \u003cli\u003eEnable SaaS operators to streamline billing handoffs from an n8n front-end workflow.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI\u003c\/strong\u003e: n8n nodes including \u003ccode\u003en8nn8n-nodes-langchainagent\u003c\/code\u003e and chat model nodes using \u003cstrong\u003eGPT-4o-mini\u003c\/strong\u003e with a structured output parser.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSquare API\u003c\/strong\u003e: uses HTTP requests with \u003cstrong\u003eSquare access token\u003c\/strong\u003e authorization and your \u003cstrong\u003eSquare location ID\u003c\/strong\u003e to create customers, orders, invoices, and subscriptions.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogic nodes\u003c\/strong\u003e: \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, and supporting workflow elements for routing recurring vs. one-time invoices.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45872850370739,"sku":"N8N-18404","price":61.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/Nxm2ZC61MpYXnarPfoz4_7UG3iKjZ.png?v=1787217680","url":"https:\/\/buyflowscripts.com\/products\/square-invoice-subscription-builder-from-text-gpt-4o-mini","provider":"N8N Commerce","version":"1.0","type":"link"}