Create expense reports directly from email receipts

Allow your employees to directly import expense report information from their email.

Last updated: July, 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

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 G Suite Developer Hub.

Next, deploy the add-on:

  1. Select View > Show manifest file, which opens a file titled appsscript.json.
  2. Select Publish > Deploy from manifest.
  3. Next to the entry Latest Version (Head) click Get ID.
  4. Select and copy the Deployment ID value.
  5. Close the dialog and the Deployments window.
  6. Open the Gmail add-on settings tab.
  7. In the Add-ons tab, ensure that you have selected the Enable developer add-ons for my account checkbox.
  8. Paste your add-on's deployment ID into the Developer add-ons textbox and click Install.
  9. In the Install developer add-on dialog that appears, click the checkbox to indicate that you trust this developer (yourself), then click Install.

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.

Send feedback about...

G Suite Developer