Templates

Month-end accounting pack

Automation template · Reporting ·View source

Sign in to use

On the 1st of every month, prepares last month's orders, refunds, payouts and tax by country as CSV files and a one-page PDF summary, and emails your accountant the links once you approve.

How it works

Trigger
The 1st of every month, early morning
Exports
Last month's orders and refunds as CSV files your accountant can open in Excel
Summarises
Sales, refunds, tax by country and payouts on one PDF page, with anything that doesn't add up
Asks you
To approve the email to your accountant with the links (needs Resend)

What it needs

From your data. The agent finds the matching fields in your schema and confirms them with you.

  • The order number your accountant will see
  • When the order was placed or paid
  • The order's total paid amount, including tax and shipping
  • Tax (VAT, sales tax) charged on the order (optional)
  • Shipping charged on the order (optional)
  • The country the order ships or is billed to, for tax by country (optional)
  • The order's currency, when the store sells in more than one (optional)
  • The order's status, to leave out test and cancelled orders (optional)
  • Refunds: amount, date and the order they belong to (optional)
  • How the order was paid (card, PayPal, bank transfer), to match payouts (optional)

You'll choose

  • When to run · default 0 6 1 * *06:00 on the 1st of every month by default
  • Time zone · default Europe/LondonUsed for the schedule and for where last month starts and ends
  • Accountant's emailLeave empty to get the pack in the run only, without an email
  • Reply-to addressWhere your accountant's replies should go, e.g. your own inbox
  • Store nameUsed in the email and on the summary

Works best with

The agent offers to set these skills up too, or to use ones you already have.

Example output

Run summary, 1 May: accounts for April 2026

Totals (GBP)

  • 412 orders · gross sales £31,344.77 · net £24,964.40 · tax £4,980.37 · shipping £1,400.00
  • Refunds £1,912.50 (23 refunds) · sales after refunds £29,432.27

Tax by country

CountryOrdersNet salesTax
United Kingdom341£20,716.10£4,143.22
Germany38£2,598.30£493.68
France21£1,201.00£240.20
Ireland12£449.00£103.27

Payouts

  • Shopify Payments: 9 payouts, £27,310.42 after £812.36 fees; difference to card sales 0.8%, normal.
  • PayPal: £2,604.11 after £96.40 fees.

Points to check

  • Orders #10482 and #10517 have no country.
  • Refund on #10233 (£180.00) is for a March order; it is in April’s refunds file.

Files: summary-2026-04.pdf · orders-2026-04.csv · refunds-2026-04.csv


Email to accounts@ledgerandco.example, waiting for approval

Subject: Northline Goods: accounts for April 2026

Hi,

April’s figures: sales after refunds £29,432.27, tax £4,980.37, refunds £1,912.50.

Two points to check: orders #10482 and #10517 have no country, and one refund (£180.00) is for a March order.

Summary: https://northline.flexkit.io/artifacts/…/summary-2026-04.pdf Orders: https://northline.flexkit.io/artifacts/…/orders-2026-04.csv Refunds: https://northline.flexkit.io/artifacts/…/refunds-2026-04.csv

Reply to this email with any questions.

Northline Goods

Show the instructions

Month-end accounting pack

On the 1st, prepare last month’s accounting pack for {{storeName}}: CSV files of orders and refunds, a one-page PDF summary, and an email with the links to the accountant once a person approves it. “Last month” is the previous calendar month in {{timezone}}, from the 1st at 00:00 to the last day at 23:59:59. You read data and create files; you never change a record.

If a reporting-definitions skill is loaded, its definitions of revenue, refunds and exclusions win over the defaults below. Load the files and artifacts capabilities: you need record exports, a sandbox for the summary and a PDF.

1. Export the records

Export CSV files with Export Records, sorted by date then order number:

  1. orders-.csv: every order placed last month, test and cancelled orders excluded. Columns: order number, date, country, currency, net amount (total − tax − shipping), tax, shipping, total, payment method, status.
  2. refunds-.csv: every refund issued last month, whatever month its order is from. Columns: refund date, order number, order date, country, currency, amount, tax refunded when known, reason when known.

If an export is cut short, say so in the summary and in the email; never send a partial file as if it were complete.

2. Payouts (when connected)

  • Shopify: query Shopify Payments payouts with a date in last month: date, amount, fees, status. When the query is refused for missing access, say “Shopify payouts not available: the Shopify connection lacks payout access” and continue.
  • PayPal: list last month’s sales, refunds and fees.

Compare payouts with sales paid by that method: payouts lag sales by a few days, so a difference at the start and end of the month is normal. Flag a difference larger than 2% of the month’s sales by that method, with both numbers.

3. Check before summarising

Look for, and list, anything the accountant would ask about:

  • Orders with no country or no tax amount, when the others have one.
  • Orders whose total ≠ net + tax + shipping (beyond rounding).
  • Refunds larger than their order, or for an order that is not in the data.
  • Duplicate order numbers.
  • More than one currency: report each separately, never add them up.

Flag the run when anything is listed.

4. The one-page summary

In a sandbox, write one self-contained HTML page and render it with Generate PDF Artifact as summary-.pdf:

  • Title: “{{storeName}}: sales summary for ”, and the date it was made.
  • Totals: orders, gross sales (totals), net sales, tax, shipping, refunds, and sales after refunds, per currency.
  • Tax by country: country, orders, net sales, tax; sorted by tax, largest first.
  • Payouts: per provider, payouts and fees, with the difference to sales and whether it was flagged.
  • Points to check: the list from step 3, or “Nothing to check.”
  • A footer naming the CSV files.

One page, plain tables, no charts. Numbers with two decimals and the currency code.

5. Email the accountant

When {{accountantEmail}} is empty or Resend is not connected, skip this step: the files stay in the run for the team to download.

Otherwise, propose one email with Resend to {{accountantEmail}}, reply-to {{replyTo}}:

  • Subject: “{{storeName}}: accounts for ”.
  • Body: three lines of totals (sales after refunds, tax, refunds), the points to check (or “No points to check this month”), and the links to the summary PDF and the two CSV files. End with: “Reply to this email with any questions.”
  • Never send it without approval, and never send it twice for the same month.

6. Report

End with the totals, the points to check, the file links and whether the email is waiting for approval.