How I Automated Paid Invoices Without Paying for Another Microsoft Service

A deliberately over-engineered workshop machine automatically sending paid invoices without another premium subscription.
A deliberately over-engineered workshop machine automatically sending paid invoices without another premium subscription.

The goal was boring, which usually means it is worth automating.

When an RKP order is paid, the correct invoice should reach the correct person automatically. The customer should also be able to download it later from their account.

No hunting. No forwarding. No “can you resend invoice 1221?”.

The obvious route

The first design was Shopify calling Power Automate directly over HTTP.

Technically sensible. Commercially annoying.

That route risked dragging a Premium Microsoft connector/licence into a job that did not deserve another monthly bill.

The less glamorous route that actually worked

Instead, Shopify Flow generates the event and sends it through the support mailbox. Power Automate then uses Outlook Standard to pick it up and send the invoice onward.

There is also a deterministic document-ID calculation so the automation can retrieve the matching PDF, and company-specific invoice recipients are used where configured.

Then came customer accounts

I also wanted customers to be able to download invoices themselves.

The neat account-extension route ran into editor/domain problems, so the final solution used a raw DOM action instead. Not as pretty architecturally. Much prettier operationally because it worked.

The result

  • Paid order arrives.
  • The correct invoice PDF is identified.
  • The right recipient gets it automatically.
  • The customer has an account-side download route.
  • We avoided adding another paid service just to move a PDF from A to B.

The lesson

Automation is not about using the most impressive architecture. It is about removing work without quietly creating three new subscriptions and a support problem.

Sometimes the clever solution is the one that uses the boring connector you already own.

The other half of this build, working out who should receive each invoice and when, is in How We Automated Paid Invoices From Shopify.

Steal the idea, not the secrets

Want to build your own version?

This is the public build brief: enough architecture to get moving, without the production-specific wiring that took the painful bit to discover.

Build an automatic paid-invoice workflow for an ecommerce store without adding an unnecessary premium connector.

Requirements:
- Trigger only after an order reaches the correct paid state.
- Resolve the preferred invoice recipient from the company profile, with a safe fallback.
- Retrieve or generate the matching invoice PDF.
- Send it through an email service already available in the business.
- Record that the invoice was sent so retries do not create duplicates.
- Log failures and provide a manual resend route.
- Add a customer-account action so the buyer can download the invoice later.
- Keep email delivery and PDF retrieval loosely coupled so either can be replaced.
- Handle refunds, cancelled orders and unusual payment states deliberately.

Do not expose production document-ID rules, private endpoints, mailbox details or customer-routing fields in client-side code.

Back to Things I Built That Actually Worked