Automation library · Money admin

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.

LargeCalls a model: OpenAI

25 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
0Loops or waits
0Services by connector: it calls them over plain HTTP

The flow

Starts it 1Model 4Logic 8Service 12

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

  1. 1OpenAI Model - AgentLm Chat Open AiModel
  2. 2OpenAI Model - Parser AutofixLm Chat Open AiModel
  3. 31. Trigger - From Parent WorkflowExecute Workflow triggerStarts it
  4. 42. Structure Invoice DataAgentModel
  5. 5Structured Output ParserOutput Parser StructuredModel
  6. 63. Map Invoice FieldsSetLogic
  7. 74. Search CustomerHttp RequestService
  8. 85. Customer Exists?IfLogic
  9. 96a. Use Existing CustomerSetLogic
  10. 106b. Create CustomerHttp RequestService
  11. 117. Merge Customer DataSetLogic
  12. 128. Get Customer DetailsHttp RequestService
  13. 139. Check Card on FileSetLogic
  14. 1410. Card on File?IfLogic
  15. 1511a. Create Order (Card)Http RequestService
  16. 1611b. Create Order (No Card)Http RequestService
  17. 1712a. Create Invoice (Card)Http RequestService
  18. 1812b. Create Invoice (No Card)Http RequestService
  19. 1913a. Publish Invoice (Card)Http RequestService
  20. 2013b. Publish Invoice (No Card)Http RequestService
  21. 2114. Recurring Invoice?IfLogic
  22. 2215. Create Subscription PlanHttp RequestService
  23. 2318. Return Invoice LinkSetLogic
  24. 2416. Create Plan VariationHttp RequestService
  25. 2517. Attach SubscriptionHttp RequestService

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.