Skip to content
FlowHubFluxonLab
A
AI Automationfree

Create Xero AR/AP Markdown snapshots with optional OpenAI GPT summaries

by Kristianadapted from n8n official workflow galleryUpdated Aug 2026
RequiresAAI AgentCCodeOpenAI Chat ModelOpenAI Chat ModelXeroXero
Share Post Share
ScWhen Weekly at 8amWhen Weekly at …CoPrepare Snapshot ConfigPrepare Snapsho…XeRetrieve Xero Customer InvoicesRetrieve Xero C…XeRetrieve Xero Supplier BillsRetrieve Xero S…CoFlatten Customer InvoicesFlatten Custome…CoFlatten Supplier BillsFlatten Supplie…MeMerge Receivables and PayablesMerge Receivabl…CoCreate Snapshot MarkdownCreate Snapshot…CoGenerate Snapshot OutputGenerate Snapsh…AgAI Summary AgentOpenAI Chat ModelOpenAI Chat Mod…CoGenerate AI Enhanced SnapshotGenerate AI Enh…123456789
1/5
FLOWS
STEPS · 9
Runs on a schedule

Quick overview This workflow runs on a schedule to pull outstanding customer invoices and supplier bills from Xero, ranks the top 5 by amount due, and generates a Markdown AR/AP snapshot (optionally adding an OpenAI-based narrative summary). How it works Runs on a scheduled trigger (weekly by default). Sets report metadata and Xero invoice filters for receivables (ACCREC) and payables (ACCPAY) with AmountDue > 0. Fetches all matching authorised customer invoices and supplier bills from Xero. Normalizes dates and amounts, calculates days outstanding, sorts by amount due, and keeps the top 5 items for each list. Merges both lists and builds a Markdown snapshot with two tables and reporting notes. Outputs the final snapshot data (and, if enabled, sends the Markdown to OpenAI via an AI Agent to prepend a short AI summary). Setup Add a Xero OAuth2 credential and select the correct Xero tenant/organization ID used by the Xero nodes. Update the tenant/organization value in the snapshot settings (replace YOUR_XERO_TENANT_ID) and adjust the cadence label if needed. Configure the Schedule Trigger interval (weekly/monthly/quarterly/annual) to match your reporting rhythm.

Tags

n8nreference-onlyagentlm-chat-open-aixero
Connects
AAI AgentCCodeopenaichatmodelOpenAI Chat ModelxeroXero
CategoryAI Automation
Triggermanual
Complexitycomplex
Nodes12
AddedJul 9, 2026

Related workflows

See all AI Automation
ACDgmail
free

AI: Summarize podcast episode and enhance using Wikipedia

The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
AopenaichatmodelserpapigooglesearchS
free

Slack chatbot powered by AI

This workflow offers an effective way to handle a chatbot's functionality, making use of multiple tools for information retrieval, conversation context storage, and message sending. It's a setup tailored for a Slack environment, aiming to offer an interactive, AI-driven chatbot experience. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
Agmailopenaichatmodeltextclassifier
free

Suggest meeting slots using AI

The purpose of this n8n workflow is to automate the process of identifying incoming Gmail emails that are requesting an appointment, evaluating their content, checking calendar availability, and then composing and sending a response email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team