Create expense reports directly from email receipts

Allows employees to move information from email receipts into their spreadsheet expense reports without copying and pasting.

Last updated: August, 2019

Simplify how your employees do expense reporting with a Gmail Add-on and Google Sheets. Anytime a user receives an email receipt, they can open the add-on which automatically contains relevant information about the expense. Users can edit that information and then submit the form to log their expense into a spreadsheet.


Technology highlights

  • Use the Card Service for Gmail add-ons to build a UI to works both on web and mobile.
  • Store user values using Google Apps Script's Properties Service.

Try it

Learn more about this solution

First, create the script:

  1. Click here to open the bot code in the Apps Script code editor.
  2. Click the menu item File > Make a copy to get your own copy. You can later access this copy in the Google Workspace Developer Hub.

Next, deploy the add-on:

  1. Select Publish > Deploy from manifest.
  2. Next to the entry Latest Version (Head) click Install add-on.

Test it out and create a new expense report:

  1. Open any message in Gmail, either on web or mobile.
  2. A new button that resembles a receipt icon should appear on the right or bottom of your screen, depending on your platform.
  3. Click the button to authorize the add-on and follow the prompts.
  4. Open an email and fill out the receipt information and click New Sheet.
  5. Open your Google Drive to view the new expense report.

Next steps

To learn more about making this add-on, follow this codelab for detailed instructions on each step.

You can also view the full source code of this solution on GitHub to learn more about how it was built.


Were you able to get the solution up and running?

If you have an idea for another solution you'd like to see featured in our gallery submit a request on the GitHub issue tracker.