FlowRunner
Features Pricing
Theme
Start Free

Paid Shopify orders to unapproved invoices in Holded

When a Shopify order is paid, this flow finds or adds the buyer in Holded by tax number, raises the invoice unapproved and records the payment.

The prompt

When an order is paid in our Shopify store, read it and pull out the buyer, their tax number, and the lines with their VAT rates. If there's no tax number, tell finance in Slack so they can invoice it by hand. Otherwise look the buyer up in Holded by tax number and add them as a client if they're new. Raise the invoice in Holded unapproved, with the order's lines, tax rates and our Shopify sales channel. Then read the invoice back. If its total matches the order, record the payment on our Shopify Payments account in Holded. If it doesn't, flag it to finance in Slack and leave it unpaid.

FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.

The flow

Yes No Yes Yes No Yes No Starts the flow New Shopifyorder Action Record theShopify payment Action List bankaccounts Action Read the fullorder Code Prepare the invoicelines Action Flag the invoice tofinance Condition Order paid? Action List Holdedcontacts Action Add the buyer toHolded Condition Buyer already inHolded? Condition Invoice matches theorder? Action List saleschannels Condition Tax number on theorder? Code Match the buyer bytax number Action Read the invoiceback AI agent Read the buyer andlines Action Raise the invoiceunapproved Action Send the order tofinance

Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works

What each step does

  1. New Shopify order Checks your Shopify store every 5 minutes for new orders and carries on only when the order is paid.
  2. Read the buyer and lines An AI agent reads the full order and pulls out the buyer, the tax number from a checkout field, the order note or the tags, and the invoice lines with the VAT rate Shopify charged on each, taking the tax out of prices when your shop includes it. An order with no tax number goes to finance in Slack instead.
  3. Match the buyer by tax number Compares the tax number with your Holded contacts, ignoring spaces, dashes and a country prefix, and finds your sales channel and bank account by name.
  4. Add the buyer to Holded A buyer Holded does not have yet is added as a client, with the tax number as the contact code and the billing address from the order.
  5. Raise the invoice unapproved Creates the invoice with the order's lines, tax rates, currency and sales channel. It stays unapproved, so it takes no number from the series until someone approves it in Holded.
  6. Invoice matches the order? Reads the invoice back and compares its total with the order's. When they differ by more than a cent, finance hears about it in Slack and no payment is recorded.
  7. Record the Shopify payment Records the payment against the invoice on the Holded account your Shopify payouts land in, dated the day of the order.

Before you turn it on

  • Connect your Shopify and Slack accounts, enter your Shopify store domain, and enter your Holded API key.
  • Add your Anthropic key in the flow setting Anthropic key.
  • In the flow settings Holded sales channel and Holded bank account, enter the names of the sales channel and the treasury account your Shopify sales use in Holded, exactly as Holded shows them.
  • Pick your finance channel in the two Slack steps.
  • The flow looks for the buyer's tax number in a checkout field first, then the order note and tags, so add a tax number field to your checkout.