Version 2 of the Gmail to Evernote script has been released. The new version adds text on top of the message in Evernote, with the basic headers from the email message (From, To, Date) and a link back to view the message in Gmail. For example, if you forwarded the message to a task list in Evernote, you can now quickly send a response after completing the task. No more searching in Gmail to find the message back!
There are more changes, and you have to do some extra configuration steps if you use multiple sign-in for Google, because in that case, the link to the Gmail message is not always correct.
This version will send email notifications when a new version is available. If you are running the script directly from bit.ly/gmailevernote, you don’t need to update, and you will not receive a notification, unless some other action is required or relevant information can be given.
If you made your own copy of the script, you will always receive a notification of new versions, so you can replace your copy with the new version.
You may have to authorize and grant access again, see the previous update on Gmail to Evernote.
For basic configuration, see the original post on Gmail to Evernote.
If you use multiple sign-in for Google, there is no single URL for an email message. For a message with ID 12345abcd, there are two possible URLs:
- The regular one, copied from the address bar in Gmail:
- From the RSS feed (https://mail.google.com/mail/feed/atom), it looks like:
The first method only works with the first account that you used to sign in (default account). If you signed in with more accounts, the link will be
https://mail.google.com/mail/u/1/?shva=1#inbox/12345abcd for the second account, etc. So the link to an email message may be different if you signed out and sign in again in a different order, or work in a different browser.
The second method looks more promising, as it uniquely identifies both the account and the email message. However, it turned out that this only works if the account is the same as the default account. Technically, I don’t understand why this does not work, it should not be too difficult for Gmail to check whether the account is one of the signed-in accounts and use this account, so I assume this is a bug, or an oversight from the folks at Google.
Thanks to Mo’in Creemers for pointing me to the second URL format. Now it is up to Google to make this work!
The Gmail to Evernote scripts adds a link in the first format to Evernote. As mentioned, this only works for the default account. If you use multiple sign-in, you can configure the script to also present alternative links, like:
https://mail.google.com/mail/u/0/?shva=1#inbox/12345abcd - user 1 - user 2 (firstname.lastname@example.org)
You can change the number of users in the User properties (under File – Project properties), set the value for gm2en_nacct to the number of accounts.
In the new version, email header fields are also added to Evernote. In the note, you can now see who send the email, to whom, and when. Other fields are also possible, by changing the value for the gm2en_fields user property. This is a comma-separated list of the fields that will be shown.
By default the value is ‘From, To, Cc, Date’. Fields are only shown if they have content, so if there are no Cc-addresses, this header field will not be shown. Other fields that you can include are: Bcc, ReplyTo, and Subject.
If you don’t want any header fields, set the value to an empty string, ”. If you also set the value for gm2en_nacct to 0, the link to the message in Gmail will not be shown either.
You can configure the CSS style for the header DIV, containing the header fields and the link(s). By default, it is set to ‘
border-bottom:1px solid #ccc;padding-bottom:1em;margin-bottom:1em;‘ showing a light-grey line between the header and the message. You can change this by editing the user property gm2en_hdrcss.
The names of the user properties, that are specific for this script, have been changed and now have a prefix gm2en_, to avoid any confusion with other scripts.
This post is also available in: Dutch