Jump to content
Ever Better: Refreshing the Evernote Brand Read more... ×
  • 0
Bernard038

Gmail to Evernote: Snoozever and my adaptation

Idea

Hello All,

 

If you are a Google Inbox user, you can use the Snoozever script to send mails snoozed in Google Inbox, automatically to EN. I have changed this script somewhat to get it working in Gmail, and let it fit my personal needs.

 

What i have changed:

  1. Instead of a tag, the mails i am sending to EN have a reminder set to the next day (so they show up in my reminders list)
  2. When i want to send a mail to EN i apply the label Evernote. The script will send the mail to EN and will remove this label afterwards, as i would like to archive mails myself...

Below you will find the code, if you would like to use it, please feel free to do so, installing is easy, follow the instructions on Snoozever.com, and choose for yourself which script you would like to use ;-) If you have adapted the script to fit YOUR needs, please post the changes!

 

Here's my script:

 

function snoozever() {

 
  /***********************************************
  * SETTINGS
  ***********************************************/
 
  var evernoteEmail = 'XXX@m.evernote.com';
    var notebook = ' ';
  var reminder = '!tomorrow';
 
 
 
  /***********************************************
  * ACTION
  ***********************************************/
 
  // Get snoozed threads
  var threads = GmailApp.search('label:Evernote');
 
 
  // Loop of snoozed threads
  for(i in threads){
    // Get last message of threads
    var message = threads.getMessages()[threads.getMessageCount()-1];
 
    //Forward last message to evernote
    message.forward(evernoteEmail, {
      subject: 'To do: '+message.getSubject()+' '+reminder+' '+notebook
    });
 
    // Remove Label
  var myLabel = GmailApp.getUserLabelByName('Evernote');
 var threads = myLabel.getThreads();
 for (var x in threads) {
   var thread = threads[x];
   thread.removeLabel(myLabel);
 }
 
}
 
  • Like 1

Share this post


Link to post

1 reply to this idea

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×