Jump to content

Alfred-evernote-workflow


Recommended Posts

Hi everyone,

 

Let me introduce evernote workflow that I use.

 

I made this workflow for adding some features that I wanted at first, and I share this with you because I think it would be much better to use it together.

 

You can check it on below repository including demo.

 

Repo: https://github.com/jopemachine/alfred-evernote-workflow

 

And as for how to install, please refer the README.md of above repository. 

 

Feature

* Fast search using 
* Preview feature using caching.
* You can change your search details.

Prerequisite

* Evernote Client on macOS (None App-store version)

* Node JS

 

How to use

### en

Switch to Evernote App.

 

### en > authtoken { Argument }

Argument: {`Your api key`}

This command is required only for the initial authentication process.

This command save the token value obtained from gettoken to a file.

 

### en > gettoken

This command is required only for the initial authentication process.

The command opens Chrome to the Evernote site.

When you log in to the site and press the authentication button, `oauthToken` is printed in json format.

Pass the value as a argument in the authoken command.

 

### en > help

Open Github link to view README.md.

 

### en > sync

Sync Evernote Client.

 

### en > savecache

Alfred-evernote-workflow use html cache to enable note preview feature.

This command save html caches of all of notes from your Evernote client. 

When the command is running, you are not able to run note searches with the `ens` command.

In this case, the `ens` command displays the number of notes that are cached to show you progress.

If caching is not done properly for some reason, you can use `en > clearcache` and this command to perform initial caching.

After initial caching, the cache will be updated automatically.

 

### en > clearcache

Delete all of your html caches.

If you delete all the cache and use the `ens`, you are likely to be caught in the sdk's api call limit.

 

### en > clearlog

Clean all command logs

 

### entodo

Search only for notes that have check boxes.

 

### encl 

Adds the text from the clipboard to the Evernote as a new note. 

 

### enclo

Adds the text from the clipboard to the Evernote as a new note and Open the note. 

 

### enc { Argument }

Argument: {`note content`}

Create note by text.

 

### enct

Argument: {`note title to create`}

Search tag name and create note by the selected tag and note content if you want.

 

### enu { Argument }

Argument: {`url to search with`}

If no argument exist, search for all notes with source URL.

Search Notes by url.

 

### ens { Argument }

Argument: {`content to search`}

Search the Evernote's notes.

If no argument exist, search for the most recent notes (may vary depending on options)

To change the search option, see the topic *Options.*

 

* #### *Shift key* + <kbd>Enter</kbd>

You can invoke the Quicklook by pressing the shift key for the `ens` search results.

Quicklook displays the note in html format.

 

* #### *Fn key* + <kbd>Enter</kbd>

You can view the source URL for that note by pressing the Fn key for the search results in theens.

And you can open the source URL by chrome by entering the item.

If the note does not contain a sourceURL, you will receive an error notification.

 

### enn { Argument }

Argument: {`content to search`}

Search the Evernote's notes in your Trash bin.

Note that the enter action for this command is to open the cache of the note in the Chrome browser.

(Not your Evernote client)


### ent { Argument }

Argument: {`tag name`}

Search Evernote's tag. You can filter notes by entering on that tag.

If no argument exist, search for all tags.

If you select the tag, the notes with the tag will be searched.

You can search these notes just like the `ens` command.

 

* #### *Command key* + <kbd>Enter</kbd>

By pressing the command key and pressing the entry, you can open the window for notes with that tag.

 

### enr { Argument }

Argument: {`content to search`}

Search only for notes that have reminder.

 

### enb { Argument }

Argument: {`notebook name`}

Search notes by Notebook.

If you select the notebook, the notes in that notebook will be searched.

If no argument exist, search for all notebooks.

You can search these notes again.

 

### enf { Argument }

1st Argument: {`file extension`}

2nd Argument: {`content to search`}

Search for notes with attachments of a specific extension.

 

Example:

```
// Search for pdf files with compiler in file name
enf pdf compiler
```

 

### enl

Check your command usage log.

By selecting the corresponding log, you can execute the command.

The maximum number of logs to be stored can be specified in Options.

This command displays the same command only once.

enl supported commands : `ens`, `ent`, `enf`, `enr`, `enb`, `enu`, `noteopen`, `en > sync`, `entodo`

 

### enx { Argument }

Argument: {`content to search`}

Export the retrieved note to your Desktop path as html.

 

 

 

1738978270_ScreenShot2020-07-2116_00_24.thumb.png.6915dac88e598f1964a28aaab143aa8e.png

 

Edited by jopemachine
Link to comment
  • 3 weeks later...

Awesome, thanks! 

 

The workflow works well for me if the html cache is cleared. However, after having successfully saved the cache I get an error when searching for notes, as follows (error copied using your workflow function for this). I've tried clearing the cache and saving a new again, but the problem persists. I'm on macOS 10.14.6, using Evernote 7.14 (not App Store version). Any ideas? 

 

```
/usr/local/lib/node_modules/alfred-evernote-workflow/search_content/htmlCacheLog.json:1
SyntaxError: /usr/local/lib/node_modules/alfred-evernote-workflow/search_content/htmlCacheLog.json: Unexpected token × in JSON at position 58
    at parse (<anonymous>)
    at Generator.next (<anonymous>)
```

-
alfred-evernote-workflow 0.7.7
Alfred 4.1
darwin 18.7.0

 

Link to comment
5 hours ago, cands said:

Awesome, thanks! 

 

The workflow works well for me if the html cache is cleared. However, after having successfully saved the cache I get an error when searching for notes, as follows (error copied using your workflow function for this). I've tried clearing the cache and saving a new again, but the problem persists. I'm on macOS 10.14.6, using Evernote 7.14 (not App Store version). Any ideas? 

 


```
/usr/local/lib/node_modules/alfred-evernote-workflow/search_content/htmlCacheLog.json:1
SyntaxError: /usr/local/lib/node_modules/alfred-evernote-workflow/search_content/htmlCacheLog.json: Unexpected token × in JSON at position 58
    at parse (<anonymous>)
    at Generator.next (<anonymous>)
```

-
alfred-evernote-workflow 0.7.7
Alfred 4.1
darwin 18.7.0

 

 

Thanks for reporting a bug.

 

Could you give me more hint by sending me some debug info?

 

I think I need to look into your htmlCacheLog.json to resolve the issue.

 

You can send the file to below email.

 

(gravityc95@gmail.com)

 

 

Link to comment
On 8/30/2020 at 4:52 PM, cands said:

Awesome, thanks! 

 

The workflow works well for me if the html cache is cleared. However, after having successfully saved the cache I get an error when searching for notes, as follows (error copied using your workflow function for this). I've tried clearing the cache and saving a new again, but the problem persists. I'm on macOS 10.14.6, using Evernote 7.14 (not App Store version). Any ideas? 

 


```
/usr/local/lib/node_modules/alfred-evernote-workflow/search_content/htmlCacheLog.json:1
SyntaxError: /usr/local/lib/node_modules/alfred-evernote-workflow/search_content/htmlCacheLog.json: Unexpected token × in JSON at position 58
    at parse (<anonymous>)
    at Generator.next (<anonymous>)
```

-
alfred-evernote-workflow 0.7.7
Alfred 4.1
darwin 18.7.0

 

 

Fixed this issue in 0.8.0

Edited by jopemachine
Link to comment
On 9/2/2020 at 2:57 AM, jopemachine said:

 

Fixed this issue in 0.8.0

 

Thanks for looking into it. Unfortunately, the problem persists for me in 0.8.0

I'll paste the error message below and send you the htmlCacheLog.json 

 

/usr/local/lib/node_modules/alfred-evernote-workflow/search_content/thumbNailPath.json:1
SyntaxError: /usr/local/lib/node_modules/alfred-evernote-workflow/search_content/thumbNailPath.json: Unexpected
token s in JSON at position 2924
    at parse (<anonymous>)
    at Generator.next (<anonymous>)

 

Link to comment
2 hours ago, cands said:

 

Thanks for looking into it. Unfortunately, the problem persists for me in 0.8.0

I'll paste the error message below and send you the htmlCacheLog.json 

 


/usr/local/lib/node_modules/alfred-evernote-workflow/search_content/thumbNailPath.json:1
SyntaxError: /usr/local/lib/node_modules/alfred-evernote-workflow/search_content/thumbNailPath.json: Unexpected
token s in JSON at position 2924
    at parse (<anonymous>)
    at Generator.next (<anonymous>)

 

 

I think some image file has invalid characters for json (like double quotes).

 

I resolved double quotes issue and uploaded it to 0.8.1

 

May I ask you to check it?

 

I don't know if json has an invalid special symbol other than double quote, but if there is one, it will still cause the same error.

Edited by jopemachine
Link to comment
On 9/3/2020 at 9:24 AM, jopemachine said:

 

I think some image file has invalid characters for json (like double quotes).

 

I resolved double quotes issue and uploaded it to 0.8.1

 

May I ask you to check it?

 

I don't know if json has an invalid special symbol other than double quote, but if there is one, it will still cause the same error.

 

Thanks a lot, it works for me now with version 0.8.2. That's great, it is very helpful with the preview feature for quickly finding the relevant note. 

Link to comment
  • 3 weeks later...

Hi there, thanks for sharing this very promising workflow. I was searching for a faster alternative for my current/old Evernote Workflow that I've been using for years now and looking forward to give this a one go. This workflow showed up but what's holding me back is that I have to give the app read rights to all my notes (even if i don't want to use the caching..). Which is what is holding me back from using it. Not familiar with the Evernote SDK/API but why should this app have direct read rights if the SDK can perform the search and just return the results? Could you explain a bit more about the workings of the workflow as I'm not really comfortable giving read rights without any context. Thanks!

FYI - I'm mainly using it to search notes. I love that the new search bar on my iPadOS 14 also shows Evernote almost instantly but seems on MacOS it's not possible to have a snappy solution. 

Edited by jxxst
typo
Link to comment
17 hours ago, jxxst said:

Hi there, thanks for sharing this very promising workflow. I was searching for a faster alternative for my current/old Evernote Workflow that I've been using for years now and looking forward to give this a one go. This workflow showed up but what's holding me back is that I have to give the app read rights to all my notes (even if i don't want to use the caching..). Which is what is holding me back from using it. Not familiar with the Evernote SDK/API but why should this app have direct read rights if the SDK can perform the search and just return the results? Could you explain a bit more about the workings of the workflow as I'm not really comfortable giving read rights without any context. Thanks!

FYI - I'm mainly using it to search notes. I love that the new search bar on my iPadOS 14 also shows Evernote almost instantly but seems on MacOS it's not possible to have a snappy solution. 

 

Thanks for your feedback.

 

The reason this workflow require read permission is as follows.

 

This workflow search your note by your API key through Evernote SDK (js).

 

(This is one different thing from this workflow. (current/old Evernote Workflow))

 

And in this process, you need to be issued your api key having reading all your note permission to search your note. 

 

If the issued Api key does not have permission to search the note, you will not be able to retrieve the note.

 

This is done by OAuth 1.0 provided Evernote API.

 

I can't collect any information about you without any communication process (server).

 

And, the only server that this workflow uses is very simple OAuth server used once in the OAuth process.

 

Below repository is the OAuth server's codes.

 

https://github.com/jopemachine/alfred-evernote-workflow-backend

 

You can see that it's a very simple server that's just showing the oauthtoken that you received to your browser.

 

(It doesn't do anything more than that.)

 

 

Please let me know if you need any further explanation or have some question.

 

Edited by jopemachine
Link to comment
  • 4 weeks later...

It seems that Evernote 10 doesn't support AppleScript anymore.

So, the search feature itself works,(because it use sdk) but the feature to open or caching notes does not work with Evernote 10.

(and all functions that need to AppleScript is not working.)

I need to think about if this is feasible to implement these features without going through Apple Script..

Edited by jopemachine
Link to comment

@jopemachine The response I got from Evernote is that it's one of the features they're still considering. While I'm not holding much hope, the more people make their interest known to Evernote (rather than just here in our forum), the more likely they'll give it some sort of priority.

 

If AppleScript no longer works, it may be possible for a new Evernote workflow to be created using the API instead of AppleScript... 

 

The Evernote 7 legacy version can still be downloaded here in the meantime:

https://help.evernote.com/hc/en-us/articles/360052560314

 

Cheers,
Vero

Link to comment
20 hours ago, Vero said:

@jopemachine The response I got from Evernote is that it's one of the features they're still considering. While I'm not holding much hope, the more people make their interest known to Evernote (rather than just here in our forum), the more likely they'll give it some sort of priority.

 

If AppleScript no longer works, it may be possible for a new Evernote workflow to be created using the API instead of AppleScript... 

 

The Evernote 7 legacy version can still be downloaded here in the meantime:

https://help.evernote.com/hc/en-us/articles/360052560314

 

Cheers,
Vero

 

Thanks for sharing this.

 

I hope that a new API for automation (including note open, exporting etc) will come out to enable this workflow again..

Link to comment
  • 1 year later...
On 10/15/2020 at 11:23 AM, Vero said:

@jopemachine The response I got from Evernote is that it's one of the features they're still considering. While I'm not holding much hope, the more people make their interest known to Evernote (rather than just here in our forum), the more likely they'll give it some sort of priority.

 

If AppleScript no longer works, it may be possible for a new Evernote workflow to be created using the API instead of AppleScript... 

 

The Evernote 7 legacy version can still be downloaded here in the meantime:

https://help.evernote.com/hc/en-us/articles/360052560314

 

Cheers,
Vero


Hi Vero,

Do you know where we can add +1 priority in Evernote roadmap ?
Thanks in advance.

Joel

Link to comment
  • 4 months later...

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
×
×
  • Create New...