Set up Gmail as Email Source for Invoices
Lentune can fetch invoices attached to emails from your accounts email address if this is hosted by Gmail.
Generate an app password for Lentune on your Google account
Lentune settings and account linking
Overview
To enable Lentune to fetch email attachments from you Gmail accounts email address, we need to generate an app password on your google account. We also have to set a number of settings on your Lentune site.
Generate an app Password for Lentune on your Google account
To connect to your inbox, you need to generate an app password. Before you can do that, you need to make sure that you have turn on 2 step verification on the google account that we are connecting. Just follow the instructions below:
-
Turn on 2 step verification on the accounts Gmail address before we can generate an app password.
- Generate the app password
-
- Link: https://myaccount.google.com/apppasswords
- Google help: Sign in with app passwords
You’ll be given a code that’s several digits long. Copy this to your clipboard and enter it as the password in the email source in the next step
Lentune Settings and Account Linking
Now that we have prepared the app password, we can set the email source details in Lentune.
- In Lentune, go to: Administration > Settings > Email source
- Select New email source or double click an existing one to edit
- Enter in the following values for the email source:
- Description: Give the source a name. For example: Accounts
- Email source is used for: Set Invoice automation
- Authentication: Basic Auth
- Host name (imap server): smtp.gmail.com
- Port: 993 and tick SSL
- User name: your accounts email address
- Password: the one-time password you generated above
- Click Change (next to mailbox name) to set the folder that Lentune needs to look at. This folder can be your inbox if you want for all emails to be processed by Lentune
- Click Confirm to save the settings

Need more help? We’re here! We hope our article was helpful! If you need more info or want to connect, drop us an email at support@lentune.com.
Thank you. We love to hear from you!
Last updated: 13 November 2025