# Generate Square invoices and subscriptions from text: n8n workflow

> Started by an event in a connected app. It calls services over plain HTTP rather than through connectors. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/generate-square-invoices-and-subscriptions-from-text (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Money admin](https://millionrounds.com/workflows?category=Money+admin#library)

# Generate Square invoices and subscriptions from text

Started by an event in a connected app. It calls services over plain HTTP rather than through connectors. It hands the judgement calls to OpenAI. 25 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgenerate-square-invoices-and-subscriptions-from-text)

**25 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**0** Services by connector: it calls them over plain HTTP

## The flow

Starts it 1 Model 4 Logic 8 Service 12

The steps in the order they run, from what starts it.

- 1 **OpenAI Model - Agent** Lm Chat Open Ai *Model*
- 2 **OpenAI Model - Parser Autofix** Lm Chat Open Ai *Model*
- 3 **1. Trigger - From Parent Workflow** Execute Workflow trigger *Starts it*
- 4 **2. Structure Invoice Data** Agent *Model*
- 5 **Structured Output Parser** Output Parser Structured *Model*
- 6 **3. Map Invoice Fields** Set *Logic*
- 7 **4. Search Customer** Http Request *Service*
- 8 **5. Customer Exists?** If *Logic*
- 9 **6a. Use Existing Customer** Set *Logic*
- 10 **6b. Create Customer** Http Request *Service*
- 11 **7. Merge Customer Data** Set *Logic*
- 12 **8. Get Customer Details** Http Request *Service*
- 13 **9. Check Card on File** Set *Logic*
- 14 **10. Card on File?** If *Logic*
- 15 **11a. Create Order (Card)** Http Request *Service*
- 16 **11b. Create Order (No Card)** Http Request *Service*
- 17 **12a. Create Invoice (Card)** Http Request *Service*
- 18 **12b. Create Invoice (No Card)** Http Request *Service*
- 19 **13a. Publish Invoice (Card)** Http Request *Service*
- 20 **13b. Publish Invoice (No Card)** Http Request *Service*
- 21 **14. Recurring Invoice?** If *Logic*
- 22 **15. Create Subscription Plan** Http Request *Service*
- 23 **18. Return Invoice Link** Set *Logic*
- 24 **16. Create Plan Variation** Http Request *Service*
- 25 **17. Attach Subscription** Http Request *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 25, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Nothing by connector; it calls services over plain HTTP
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 25 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 25 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgenerate-square-invoices-and-subscriptions-from-text)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Workflows like it

Also money admin, with the same services where possible, closest in size first.

- [**Automated template delivery system with Stripe and Gmail** 25 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/automated-template-delivery-system-with-stripe-and-gmail)
- [**Create AI proposals from Fireflies transcripts with OpenAI** 25 steps · calls a model · Gmail, Google Docs](https://millionrounds.com/workflow/create-ai-proposals-from-fireflies-transcripts-with-openai)
- [**Create cinematic quote videos with Gemini** 25 steps · calls a model · Google Cloud Storage, Google Sheets](https://millionrounds.com/workflow/create-cinematic-quote-videos-with-gemini)
- [**Extract Amazon invoice data with Airtop and OpenAI** 25 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/extract-amazon-invoice-data-with-airtop-and-openai)
- [**Invoice processing with Slack** 25 steps · calls a model · Google Drive, Slack](https://millionrounds.com/workflow/invoice-processing-with-slack)
- [**Track receipt expenses from Telegram with Gemini** 25 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/track-receipt-expenses-from-telegram-with-gemini)
