Fetch emails to Obsidian (as markdown) from Gmail server
This plugin saves emails on Gmail as markdown notes. Use this plugin safely so you won't mess up your gmail account.
Already have a credential : If you're using google api in other plugins you can simplely enable the Gmail api for that project, then you can reuse the credential.
Use my credential : I have a credential for 100 users and would like to know how much it's gonna cost for multiple users. Contact me so you don't need to go through this part. (thingnotok at gmail.com)
Create your own credential, it's free : Goto https://console.cloud.google.com/ to create the credential.
Install this plugin manually or through BRAT
Enable the plugin, and click option (or open the seting panel of this plugin)
Click Setup
button and Paste content from credential.json (from installation I)
A web window should show up and ask you to login google with email access permission.
The plugin will automatically query available labels in your Gmail account. Select the from/to labels to fetch.
Assign a Folder to store all the collected email notes. (Default is "fetchedMail")
Click the ribbon button on left side to fetch all the emails with that label.
Labels: This plugin use label to decide which mail to fetch. So you need to use Gmail to assign the {From} label to those mails you want to fetch. The {From} label will be removed from the fetched mails, and {To} label will be added. These two labels should be mutually exclusive. I suggest to create a new label for {To}.
Filters:
Check Template to learn how to setup a note template for email notes.
Background:
Currently, the plugin will keep a .token.json
file containing all the information required to access gmail account, so you don't have login everytime. But it also means that anyone with the file can do whatever he/she wants to your emails. In addition to the others, all plugins you use have access to this file, too.
This is actually a common issue for plugins trying to integrate other services. There are discussions about how to safely keep these security files. But it's not gonna easy for a pure local application.
What to do? For now, please don't use this plugin in public computers or shared vaults. Make sure no one can access the token file.
Another approach is that if you use this plugin for "newsletters" and "send to obsidian", then you can create a separate gmail account for them so those important business letters won't be afftected.