Generate the month's accounting export

Generates the month's accounting journals as a preview, checks what is left out, then commits the export only on request.

ControllerπŸ“† MonthlyExpertCan make changes

Ask it like this

Give me a preview of September's purchase journal, without marking anything as exported.

When to use it

At close, to produce the month's journals, first as a preview and then as the final export.

What it produces

Count and amount of excluded payables, a download link for the zip (valid 1 hour), and a clear statement: preview or committed export.

How it works

  1. 1Counts the expenses that will stay out of the export
  2. 2Generates a preview of the journals, changing nothing
  3. 3Gives you the file to download and check
  4. 4Waits for your explicit go-ahead before any final export
  5. 5States clearly: a preview only, or a committed export

What protects you

  • This skill can change Spendesk data: every action waits for your confirmation
  • Write actions are in Beta and off by default: an Admin or Account Owner enables them
  • It acts with your permissions and your role, never beyond
  • The assistant cannot approve or pay
β–ΈTechnical detail80/100 Β· 4 tools
ERP exportReconciliationget_journal_templatesget_payablescreate_accounting_exportget_accounting_export

# Accounting export: preview, check, commit

## ⚠️ Write tool in Beta

`create_accounting_export`, `get_accounting_export` and `get_journal_templates` need the "Manage accounting exports" permission, off by default: an Admin or Account Owner enables it on the connection, then the user reconnects and ticks it. Without it, these tools do not appear at all.

**A committed export cannot be undone**: the payables and settlements it includes move to "exported". A preview changes nothing. This skill always previews first and only commits on the user's explicit request.

Only available when the company's accounting software is Spendesk Accounting, Sage or Cegid. For any other connected software (Xero, Netsuite, Datev…), these tools return an error: do not retry.

## Step 1 β€” State the period

State the exact dates before any call ("from 2026-09-01 to 2026-09-30"). The window cannot exceed **31 days**.

## Step 2 β€” Check what will be left out (the main trap)

Payables still in `toPrepare` are **excluded from the purchase journal with no warning**: the result carries no count and no skipped list. Count them before exporting:

```json
{
  "tool": "get_payables",
  "params": { "filters": { "operator": "and", "subfilters": [
    { "field": "payableDate", "operator": "between", "value": { "from": "2026-09-01T00:00:00.000Z", "to": "2026-09-30T23:59:59.999Z" } },
    { "field": "bookkeepingStatus", "operator": "=", "value": ["toPrepare"] }
  ] } }
}
```

Tell the user how many payables will stay out of the export, and for what amount. `mark_payable_as_ready` moves one to `toExport` ("Manage payables" permission; no tool moves it back).

Verified live: for September 2026, both of the month's payables (EUR 15,779.40 and EUR 10,055.50) were in `toPrepare`. The purchase journal preview for that period, downloaded and opened, held only the header row: no entries, and no message to say so.

## Step 3 β€” Pick the template (optional)

```json
{ "tool": "get_journal_templates", "params": {} }
```

Returns `id`, `name`, `type` (`purchase` or `bank`), `isDefault`.

- `isDefault: true` means "Spendesk built-in template", **not** "the company's default template": several rows can be `true`. On the demo account, 11 templates were listed, 6 built-in (Spendesk Accounting, Sage, Cegid) and 5 created by the company.
- Without `templates`, the export uses the standard templates, in English.
- Only pass a Sage or Cegid template when the user asks for that layout.
- An empty list means no accounting integration is connected.

## Step 4 β€” Preview

```json
{
  "tool": "create_accounting_export",
  "params": { "from": "2026-09-01", "to": "2026-09-30", "journals": ["purchase"], "markEntriesAsExported": false }
}
```

- `journals` defaults to `["purchase", "bank"]`: pass only the journal that was asked for.
- `markEntriesAsExported: false` (default) = preview. Observed response: a `key`, `journalTypes: ["purchase"]`, `markedAsExported: false`.
- The purchase journal follows the payables' document date; the bank journal follows each movement's own date. Bank fees are only included by whole calendar month: a period that does not end on the last day of the month leaves that month's fees out.
- Already-exported payables are excluded unless `includeAlreadyExportedPayables: true`. Already-exported settlements are never re-included.

## Step 5 β€” Get the file

```json
{ "tool": "get_accounting_export", "params": { "key": "<key from step 4>" } }
```

Four possible outcomes:

| Response | What to do |
|----------|------------|
| `downloadUrl` | Done. A signed link to a single zip, valid for about 1 hour: tell the user. If it expires, call again with the same key |
| "still being generated" | Retry with the **same** key, 3 times at most, then hand the key back to the user |
| "failed" | Final. Do not retry: create a new export |
| "not found" | Final. Wrong key, or export created in another company: check both |

## Step 6 β€” Commit (only on explicit request)

Before committing, remind the user of: the period, the journals, the number of payables left out, and the fact that it cannot be undone. Wait for an explicit go-ahead, then repeat the step 4 call with `"markEntriesAsExported": true`.

After the call, say clearly what happened: a preview (nothing changed) or a commit (entries marked as exported). If the outcome is unclear, re-read the payables' state rather than running the export again.

## What was tested

Tested live on the demo account: the template list, the `toPrepare` payables check, creating a preview, getting the download link and opening the zip (one CSV file per journal). **The commit (`markEntriesAsExported: true`) was not run**, because it cannot be undone; its behaviour is described from the tool's documentation.

## Example user prompts

- "Give me a preview of September's purchase journal, without marking anything as exported"
- "How many September invoices will not go into the export, and why?"
- "The preview looks right: commit the September export"

How to install this skill

/
  1. 1
    Download the file s75-export-comptable-apercu-validation.md using the button above.
  2. 2
    Place the file in the .claude/ directory of your project (or ~/.claude/ for a global install).
    cp s75-export-comptable-apercu-validation.md .claude/s75-export-comptable-apercu-validation.md
  3. 3
    Use in Claude Code β€” the skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
πŸ’‘ Make sure the Spendesk MCP is configured in your .claude/settings.json with the tools get_journal_templates, get_payables, create_accounting_export, get_accounting_export.

Similar skills

β˜… Top
95/100Β·πŸ” Ad hocΒ·Expert

Audit what the MCP covers

Probes all available MCP tools, re-evaluates coverage of 50 persona use cases, detects new fields or tools, and regenerates the gap analysis report.

CFOControllerAP Manager
90/100Β·πŸ“… WeeklyΒ·Beginner

Card requests via get_requests

Explains how to use get_requests for card requests and why expense reimbursements don't appear there. Avoids a frequent source of confusion between two distinct workflows.

ControllerFinance Analyst
90/100Β·πŸ” Ad hocΒ·Intermediate

Active vs archived cost centers

Distinguishes active cost centers from archived ones with correct use of get_cost_centers. Avoids the counter-intuitive isArchived vs isActive naming convention pitfall.

ControllerFinance Analyst

Interested in AI Agent services or Custom Integrations?