Shortcuts “ENML for note is invalid” error

I’m experiencing an illusive problem with a shortcut that uses the Evernote Append to Note action. A shortcut that is working fine (ie, Evernote note is updated as expected) will suddenly start firing the “ENML for note is invalid.” error.

The content of the text sent to the Evernote note has no bearing. The error can occur with just a simple text string (eg, “test”) as the content appended.

Here’s an example shortcut. Worked fine yesterday with multiple runs. Ran it this morning (and every time since) and I received the “ENML for note is invalid” error.

https://www.icloud.com/shortcuts/af7ce16af75e4f669b27809310913d3d

I’m not sure what steps to take for troubleshooting. Again, I’ve seen the problem with a 2-step shortcut… Text action with hard coded simple text and then the Evernote action, the same problem can occur. Sporadically!

Any tips on troubleshooting this one?

When the error occurs, if you use the same again will it always fail? i.e. can you get a persistent failure?

When you are appending, is it always the same note?

The notes you are appending to. How were they initially created, and is there any consistency in their content as to when the shortcut fails and succeeds?

When the error occurs, if you use the same again will it always fail? i.e. can you get a persistent failure?

Yes. It seems once it fails, it continues to fail


When you are appending, is it always the same note?

Yes. Though, I’ve copied the shortcut and changed the Note title for testing purposes. The same behavior occurs.


The notes you are appending to. How were they initially created, and is there any consistency in their content as to when the shortcut fails and succeeds?

I’ve tried it both with a note first created in Evernote and a note first created through running the shortcut.

No consistency. The shortcut is failing with the more complex (though, really not that complex) text that includes the location and weather info. I have also had a testing shortcut fail with text that was a simple text string (“Testing”)

So you can publicly share a note that others could start with, and provide an example shortcut that appends the string “Testing” to it; whereby it always fails for you, and we can try reproducing it in the same circumstances that you have.

Normally ENML errors are down to unsupported HTML tags, etc. being included somewhere. But basically anything not covered by the ENML definition could theoretically break the note and would report such an error. The fact that you have a simple one word, plain text string makes me wonder if there’s something going on in the original notes that you are producing?

Here ya go!

https://www.icloud.com/shortcuts/e3e1c5d136bd4fc7acd46dddf23de225

Public note (I think):

FWIW, I created a second shortcut that appends to an iCloud file instead of the Evernote note. Will use that as my alternative for my “journal” use case. It’s working fine.

I am curious, though, why the Evernote shortcut is failing.

Okay, I can reproduce it from what you shared. I checked the exported ENML and that looked clean.

But given it still only happened on particular notes and with such simple text my gut feel is that there’s some corruption in the note.

I’ve not seen any corruption for probably 7 or 8 years at least now, but when it used to happen, it was often down to formatting getting corrupted and usually a bit of judicious pruning and plain text copy and paste sorted it out.

Now I guess things have probably persisted, and I’ve just been fortunate, as Evernote includes an option to simplify formatting (to simple or plain text). I tried maybe a dozen or so tests and cross-checks and simplifying the format for your note seems to resolve the issue in my testing. Give that a try and let us know if that makes a difference for you too.

Very interesting. Yes, that resolved the problem.

Thanks for the thoughtful and helpful feedback (as you always do). — jay