Archive published invoice messages to Files

Recipe ToolsData ParserMarketingUtilities

What it does

When a new message arrives in the Invoice Event topic, this automation stores it as a CSV file in Files. The message is formatted and appended to a growing archive so invoices are retained for audit and compliance.

Who it's for

Accounting teams who need a permanent record of published invoices without manual file management.

How teams use this

Build an audit trail for invoices

Every published invoice is automatically stored in a CSV file so the team has a complete record for audits and compliance reviews without manual exports.

Route invoices to finance systems

Extend this automation to include scheduled file delivery to an ERP or data warehouse so finance teams can reconcile invoices against payments.

Monitor invoice volume trends

Use the growing archive to track invoice counts and patterns over time. The CSV format makes it easy to import into analytics tools for reporting.

How it works

  1. Listen for invoice messages. A new message arrives in real-time on the Invoice Event topic in Pub Sub.
  2. Check for the archive file. Search Files for the invoice archive so the message can be added to the existing file.
  3. Format the message as CSV. Convert the invoice message into CSV format so it matches the structure of the archive file.
  4. Append to the archive. Add the formatted row to the invoice file in Files. A new file is created if none exists.