Make.com Email Automation Google Sheets Xero Finance Automation

How to Automatically Transfer Email Purchase Orders to Google Sheets and Create Invoices with Xero

Stop wasting time on manual data entry! This workflow automates the entire process of receiving email purchase orders, logging them in Google Sheets, and generating invoices in Xero.

Get This Workflow → Make.com · · Free Template
Laptop showing automated accounting and invoicing processes

What This Workflow Does

This powerful automation eliminates the tedious and error-prone task of manually processing purchase orders received via email. Imagine an online store receiving dozens, or even hundreds, of orders daily. Without automation, each email would require someone to open it, extract customer details, order items, quantities, and prices, then manually input this data into a spreadsheet and create an invoice in their accounting software. This workflow completely transforms that process.

It acts as a digital assistant, constantly monitoring your inbox for new purchase orders. Once an order email arrives, it intelligently reads and understands the content, pulls out all the critical information, logs it neatly into a designated Google Sheet for tracking, and then automatically generates a professional invoice in Xero. This not only saves countless hours of administrative work but also drastically reduces the risk of human error, ensuring accuracy in your sales records and financial reporting.

Make.com scenario overview for email purchase order automation
An overview of the Make.com scenario, showing the modules involved in processing email purchase orders.

How It Works

This automation is built on a series of interconnected steps within Make.com, designed to handle each part of the purchase order process seamlessly.

1. Capture Email Purchase Orders

The workflow begins with a Webhooks > Custom mailhook module. This unique email address acts as a dedicated inbox for your purchase orders. You simply configure your email client (like Gmail) to automatically forward any incoming purchase order emails to this mailhook. This ensures that every new order instantly triggers the automation.

Gmail forwarding settings for Make.com mailhook
Screenshot of Gmail forwarding settings, showing how to add the custom mailhook address.

2. Filter and Parse Email Content

After receiving an email, a filter ensures that only relevant emails (e.g., those with "Order" in the subject line) proceed. The core of the data extraction is handled by the Text Parser > Match pattern module. This module uses regular expressions to identify and pull out specific pieces of information from the email body, such as customer name, product details, quantities, and prices. This intelligent parsing ensures accurate data capture.

Make.com Text Parser module configuration with regex
Configuration of the Text Parser module, demonstrating how regular expressions are used to extract data from email text.
Filter settings in Make.com for email subject line
A filter configured in Make.com to process only emails containing "Order" in the subject.

3. Log Data in Google Sheets

The extracted data is then immediately sent to a Google Sheets > Add a row module. This module populates a pre-defined Google Sheet with all the order details, creating a real-time log of every purchase. This centralizes your order information, making it easy to track, analyze, and report on sales performance.

Google Sheets Add a Row module settings in Make.com
Settings for the Google Sheets module, showing the selection of the target spreadsheet and sheet.
Mapping data from Text Parser to Google Sheets in Make.com
Data mapping from the Text Parser output to the corresponding columns in Google Sheets.
Date formatting function in Make.com for Google Sheets
Using the 'formatdate' function to ensure consistent date formatting in Google Sheets.

4. Manage Customer Contacts in Xero

A Xero > Search for contacts module checks if the customer already exists in your Xero accounting system. A router then intelligently directs the workflow: if the contact is new, a Xero > Create a contact module is triggered to add the new customer. If the contact already exists, the workflow proceeds directly to invoice creation.

Xero Search for Contacts module in Make.com
Configuration of the Xero 'Search for contacts' module, searching by customer name.
Make.com filter for new Xero contacts
A filter that checks if a Contact ID exists, routing new contacts for creation.

5. Create Invoice in Xero

Finally, a Xero > Create an invoice module generates a sales invoice. For new contacts, the Contact ID from the newly created contact is used. For existing contacts, the ID found in the search step is used. All relevant details extracted from the email are mapped to the invoice fields, ensuring a complete and accurate invoice is created automatically.

Make.com filter for existing Xero contacts
A filter that checks if a Contact ID exists, routing existing contacts directly to invoice creation.

Who This Is For

This automation is ideal for any business that regularly receives purchase orders via email and uses Google Sheets for record-keeping and Xero for accounting. This includes:

  • E-commerce businesses: Streamline order processing from various sales channels that send email notifications.
  • Service providers: Automate invoicing for client projects or recurring services initiated by email.
  • Small to medium-sized businesses (SMBs): Reduce administrative overhead and free up staff for more critical tasks.
  • Wholesale suppliers: Efficiently manage incoming bulk orders and ensure timely invoicing.
  • Any business aiming for efficiency: If you're tired of manual data entry and want to improve accuracy and speed in your order-to-invoice cycle, this workflow is for you.

What You'll Need

To implement this workflow, you will need the following:

  1. A Make.com account (free tier or higher).
  2. A Google account with access to Google Sheets.
  3. A Xero account.
  4. An email account (e.g., Gmail) where purchase orders are received.
  5. A basic understanding of regular expressions for text parsing.

Quick Setup Guide

Follow these steps to quickly set up your email purchase order automation:

  1. Create the Scenario: In your Make.com account, create a new scenario and add the following modules: Webhooks > Custom mailhook, Text Parser > Match pattern, Google Sheets > Add a row, Router, Xero > Search for contacts, Xero > Create a contact, and Xero > Create an invoice (two instances, one for each route).
  2. Configure Mailhook: Copy the generated mailhook URL from the Webhooks module. In your email client (e.g., Gmail), go to settings, find the forwarding options, and add this mailhook URL as a forwarding address. Ensure emails with purchase orders are forwarded.
  3. Set up Text Parser: In the Text Parser module, map the 'Text' element from the mailhook. Create a regular expression to extract key data points (customer name, items, quantities, prices) from your typical purchase order email format. Enable 'Global match' and 'Multiline'.
  4. Add Email Filter: Between the mailhook and Text Parser, add a filter condition: "Subject" contains "Order" (case insensitive) to process only relevant emails.
  5. Map to Google Sheets: Connect the Text Parser to the Google Sheets 'Add a row' module. Select your target spreadsheet and sheet. Map the extracted data from the Text Parser to the corresponding columns in your Google Sheet. Use the `formatdate` function for date fields if needed.
  6. Configure Xero Contact Search: Connect the Google Sheets module to the Xero 'Search for contacts' module. Search by 'Name' using the customer name extracted by the Text Parser.
  7. Set up Router for Contacts: Add a Router after the Xero 'Search for contacts' module. Create two routes:
    • Route 1 (New Contact): Add a filter where 'Contact ID' (from Xero Search) 'Does not exist'. Connect this to a Xero 'Create a contact' module, mapping the customer name.
    • Route 2 (Existing Contact): Add a filter where 'Contact ID' (from Xero Search) 'Exists'.
  8. Create Xero Invoices: Add a Xero 'Create an invoice' module to both routes. For Route 1, map the 'Contact ID' from the 'Create a contact' module. For Route 2, map the 'Contact ID' from the 'Search for contacts' module. Map the extracted order details (description, quantity, unit amount, item) to the invoice line items.
  9. Test and Activate: Run the scenario once with a sample purchase order email to ensure all steps execute correctly and data is transferred accurately. Once confirmed, activate your scenario.

Pro tip: Regularly review your Google Sheet and Xero account after initial setup to ensure data is flowing as expected. Adjust your regular expressions in the Text Parser if your email formats change or if you need to capture additional data points.

Key Benefits

Implementing this automation brings significant advantages to your business operations:

Eliminate Manual Data Entry: Say goodbye to copying and pasting information from emails. This workflow automatically extracts all necessary details, drastically reducing the time spent on repetitive tasks and freeing up your team for more strategic work.

Boost Data Accuracy: Manual data entry is inherently prone to human error. By automating the transfer of purchase order details to Google Sheets and Xero, you minimize typos and inconsistencies, ensuring your records are always precise and reliable for financial reporting and inventory management.

Accelerate Order-to-Invoice Cycle: Orders are processed and invoices are generated almost instantly upon email receipt. This speed improves your cash flow, enhances customer satisfaction with quicker billing, and allows for faster fulfillment processes.

Maintain Real-time Records: With every purchase order automatically logged in Google Sheets and invoiced in Xero, you gain a real-time overview of your sales and financial standing. This immediate access to accurate data supports better decision-making and more responsive business management.

Improve Customer Experience: Faster and more accurate invoicing leads to a smoother experience for your customers. They receive their invoices promptly and correctly, reflecting professionalism and efficiency, which can strengthen customer loyalty.

Frequently Asked Questions

Common questions about email purchase order automation and integration

Automating email purchase order processing significantly reduces manual data entry, which is prone to errors and time-consuming. It ensures that every order is accurately captured and processed, leading to fewer discrepancies and improved customer satisfaction.

By streamlining this repetitive task, your team can reallocate valuable time to more strategic activities, fostering greater efficiency and productivity across your business operations. This also helps in maintaining up-to-date records without constant oversight.

This workflow is designed with a smart routing mechanism to differentiate between new and existing customers. When a purchase order email is received, the system first searches for the customer's contact information in Xero. If the contact doesn't exist, the automation automatically creates a new contact entry in Xero before proceeding to generate the invoice.

If the contact is found, the system directly creates an invoice linked to the existing customer profile, ensuring your customer database remains clean and accurate without duplicate entries. This intelligent handling saves significant administrative effort.

The automation leverages a text parser module to intelligently extract key details from your email purchase orders. This typically includes critical information such as customer name, contact details, order number, item descriptions, quantities, unit prices, and total amounts.

The flexibility of regular expressions allows for customization, meaning you can configure the parser to capture almost any structured data present in your incoming emails, adapting to various purchase order formats. This ensures comprehensive data transfer to your Google Sheet and Xero invoice.

Setting up the email forwarding is straightforward, usually involving a few clicks in your email client's settings (like Gmail) to direct specific emails to a custom mailhook URL provided by Make. The text parsing step requires a basic understanding of regular expressions to define the patterns for data extraction.

While this might seem technical, there are many online tools and resources, including the one mentioned in the guide (regex101.com), that simplify creating and testing these expressions. With a little practice, you can configure it effectively to match your specific email formats.

Integrating Google Sheets and Xero through automation offers multiple benefits. Google Sheets provides a flexible and accessible database for logging all your purchase orders, allowing for easy tracking, reporting, and analysis. Xero, on the other hand, handles the financial aspects, ensuring accurate invoicing, payment tracking, and reconciliation.

This combination creates a robust system where operational data (from Sheets) seamlessly flows into financial management (in Xero), reducing manual errors, improving financial accuracy, and providing a real-time overview of your sales and revenue. It's a powerful duo for efficient business management.

Yes, the core principles of this workflow are highly adaptable. While this template specifically uses Google Sheets and Xero, Make.com supports thousands of applications. You could easily swap Google Sheets for another database like Airtable or a CRM, and replace Xero with other accounting software such as QuickBooks, Zoho Books, or FreshBooks, provided Make.com offers connectors for those applications.

The modular nature of Make scenarios allows for significant customization to fit your existing tech stack and specific business processes. This flexibility makes it a versatile solution for various business needs.

Absolutely! While this template provides a solid foundation, GrowwStacks specializes in building custom automation solutions tailored to your unique business requirements. If your email purchase order formats are complex, you use different accounting or CRM systems, or you have additional steps you'd like to integrate into the workflow, our expert team can design and implement a bespoke automation.

We'll work with you to understand your specific needs and create a seamless, efficient system that perfectly fits your operations, ensuring maximum time and cost savings.

Need a Custom Email Purchase Order Automation?

This free template is a starting point. Our team builds fully tailored automation systems for your specific business needs.