Email is the easy way to get reports to people, but many teams also want every month's pack filed in one place: a SharePoint library for the finance team, a OneDrive folder for the auditors, a Google Drive folder for the board. Xero's standard report screens have no schedule option, let alone a way to file the reports. Here's how to send your Xero reports on a schedule and have each one saved to OneDrive, SharePoint or Google Drive as it arrives, using Power Automate, Zapier, Make or Apps Script.
The idea
- Reportpost emails the reports on a schedule, as PDF, Excel or CSV, from reports@reportpost.app.
- A small automation in your Microsoft 365 or Google account watches for those emails and saves the attachments to the folder you choose.
You set it up once. After that each pack lands in your inbox and in the shared folder at the same time, and nobody has to remember to file it. Send the reports to a mailbox used only for this, and the automation sees nothing but report emails.
OneDrive or SharePoint with Power Automate
If your Microsoft 365 plan includes Power Automate, create an automated cloud flow:
- Trigger: Office 365 Outlook, "When a new email arrives (V3)". Set From to reports@reportpost.app, and turn on Include Attachments and Only with Attachments. If the mailbox is a shared mailbox, use "When a new email arrives in a shared mailbox (V2)" instead.
- Action: for each attachment, "Create file" in OneDrive for Business (choose the folder) or in SharePoint (choose the site and library folder). Use the attachment's name and content.
- Save and turn the flow on, then use Send test to me in Reportpost to check a file appears.
Reportpost names files after the organisation, the schedule and the period, for example "Highfield Joinery Ltd - Monthly pack - September 2026.pdf", so files sort neatly in the folder month after month.
Google Drive with Zapier or Make
If you use Google Workspace, a tool like Zapier or Make can do the same:
- Trigger: in Zapier, Gmail "New Attachment" with the search from:reports@reportpost.app. In Make, use a Gmail module that watches for new emails with the same filter, followed by a step that goes through the attachments.
- Action: Google Drive, upload the file into the folder you choose.
- Run a test with Send test to me in Reportpost.
The same tools can also save Outlook attachments to Google Drive, or Gmail attachments to OneDrive, if your setup is mixed.
Straight into a Google Sheet, with Apps Script
If you want the numbers in a Google Sheet rather than a file in Drive, for a dashboard or a sheet with your own formulas, you don't need Zapier. Choose CSV in Reportpost (one file per report), send it to the Gmail or Google Workspace address you open the sheet with, and let a short script copy the newest file of each report into a tab:
- Open the Google Sheet and go to Extensions > Apps Script.
- Replace the code in the editor with the script below. In the
WANTEDlist at the top, add one line per report: its name as it appears in the file name, then the tab it should fill. The script clears that tab each time, so keep your own formulas on another tab. - Save, check that
importReportpostCsvis selected next to Run, and click Run. Google asks for permission to use your Gmail and this spreadsheet. Its wording covers more than the script does: it only searches for Reportpost emails and reads their CSV files, in your own account. If you see "Google hasn't verified this app", that's normal for a script you wrote yourself: click Advanced, then Go to your project's name. If the next screen has checkboxes, tick them all, then click Continue. - Open Triggers (the clock icon on the left) and click Add Trigger. Choose
importReportpostCsv, set the event source to Time-driven, pick a day, week or month timer to match your schedule, and choose an hour that starts at least an hour after your reports go out. Click Save.
/** @OnlyCurrentDoc */
// Copies the newest Reportpost CSV of each report below into its own tab of this sheet.
// One line per report: the report's name as in the file name, then the tab to overwrite.
// Sending the same report for several organisations? Add the start of the
// organisation's name, as in the file name, as a third value.
const WANTED = [
['Profit and Loss', 'Profit and Loss'],
// ['Aged Receivables Summary', 'Receivables'],
// ['Profit and Loss', 'Highfield P&L', 'Highfield'],
];
function importReportpostCsv() {
const threads = GmailApp.search('from:reports@reportpost.app filename:csv newer_than:100d', 0, 100);
// Newest email first, whichever thread Gmail put it in.
const messages = GmailApp.getMessagesForThreads(threads).flat()
.sort((a, b) => b.getDate() - a.getDate());
for (const [report, tab, org = ''] of WANTED) {
for (const message of messages) {
const file = message.getAttachments().find(a => a.getName().endsWith('.csv') &&
a.getName().startsWith(org) && a.getName().includes(' - ' + report + ' - '));
if (file) {
writeCsv(file, tab);
break;
}
}
}
}
function writeCsv(file, tab) {
const text = file.getDataAsString('UTF-8').replace(/^\uFEFF/, '').replace(/\r\n/g, '\n');
const rows = Utilities.parseCsv(text).filter(r => r.some(c => c !== ''));
if (!rows.length) return;
const width = Math.max(...rows.map(r => r.length));
const data = rows.map(r => r.concat(Array(width - r.length).fill('')).map(toCell));
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheetByName(tab) || ss.insertSheet(tab);
sheet.clearContents();
sheet.getRange(1, 1, data.length, width).setValues(data);
}
// Amounts become numbers whatever the sheet's locale. Percentages and dates are left
// for Sheets to read; anything else stays text, so invoice number 0042 keeps its zeros.
function toCell(c) {
if (/^-?(0|[1-9]\d*)(\.\d+)?$/.test(c)) return Number(c);
if (c === '' || c.startsWith("'") || /^-?\d+(\.\d+)?%$|^\d{1,2} [A-Z][a-z]+ \d{4}$|^\d{4}-\d{2}-\d{2}$/.test(c)) return c;
return "'" + c;
}
Amounts go in as numbers, whatever your sheet's locale, so sums and charts work straight away, and text such as invoice numbers stays as it was. For pivot tables, choose the Power BI-ready CSV instead. It sends the Profit and Loss and Balance Sheet as one table, with a row per account and period and real dates. Its file name has the schedule's name where a report name would be, so put the schedule's name in WANTED. If the same report goes out for several organisations, add the start of the organisation's name as a third value, as in the Highfield line of the script. Copy that name from the file name. File names leave out accents and some punctuation, so "Müller GmbH" appears as "Mller GmbH". The script looks back 100 days. If it finds no email for a report, it leaves that tab as it was.
Tips
- Excel for analysis, PDF for the record. Choose "PDF and Excel" in Reportpost if one folder is for reading and another feeds a spreadsheet.
- One folder per client. Bookkeepers can give each client's schedule a different recipient address or subject, and route each to its own folder.
- Check permissions. Make sure the account running the automation can write to the folder, especially for SharePoint libraries shared across a team.
Setting up the schedule
In Reportpost, connect Xero (read-only), pick the reports and period, set the day and hour, and add the mailbox your automation watches as a recipient, alongside anyone who should get the email itself. You can try the demo without connecting Xero.
If a built-in connection to OneDrive, SharePoint or Google Drive would help you, email support@reportpost.app. We use these requests to decide what to build next.
Related: the ways to connect Xero to Google Sheets, exporting Xero reports to Excel automatically, all the ways to schedule Xero reports and the Xero reports explained.