Shortcuts & Evernote - Actions don't all execute

I have a Workspace with a collection of drafts (each draft is a question), and I want - on a scheduled basis - to automatically append each draft to the same note in Evernote.

Currently, I have 16 drafts and when I run the following Action:

The green banner does display itself 16 times sequentially:

However, when I go to my note in Evernote, not all 16 drafts have been appended. Maybe half of that.

I tried adding a “Wait X seconds” to the Shortcut, however this I have found doesn’t even trigger 16 green banners - it may display only 8, but at least those 8 all actually get appended to the note.

I assume the green banner is not a success response? I’m assuming there is some sort of rate limit throttling with the Evernote API, but I have no insight into that. If Evernote did reply with a 429 response, it clearly isn’t being reflected.

Any ideas how I can achieve what I’m looking at? I’m guessing the best path forward would probably to have a script that takes all the drafts in my Workspace, creates a single draft out of them all, then does just a single call to Evernote. If anyone could provide an example of such a script (I imagine it would be better writing the script in Drafts as opposed to creating a Shortcut) which consolidates all drafts of a Workspace, it would be greatly appreciated. Thank you.

1 Like

I’m going to take a guess that this is related to your post here.

If you look at my response to that one, you’ll see I’m using the content of the draft in the append. You are using the draft. That could be one reason. My first recommendation would therefore be to try that.

Going further on the debugging if that does not work, I would use two quick look actions in the loop.

One quick look at the start to look at the content of the draft - so that you can see Shortcuts has picked up the draft content.

One quick look at the end to look at the content of the Evernote note (if you read the append to Evernote action in Shortcuts, you’ll see the result is the Evernote note, and when you add it to quick look, the default valuer as ‘Evernote Note’ is the content of the note).

Now you know what is being sent to Evernote and what is being stored/returned by Evernote.

Of course, as you noted, an alternative approach would be to collect all of the content from Drafts first, and then append it in one go to Evernote. That should also eliminate any timing glitches by only having a single access run against Evernote. It is just a reshuffling of what you had above, or in this case, what I posted on your other query, as it saved me some fiddling around, and you get the bonus of what would auto archive the processed drafts.

Hope that helps.

1 Like

That’s extremely helpful. Calling Evernote within Shortcuts appears to successfully append each note, as opposed to running an action within Drafts which then makes the Evernote requests.

In the other thread, you said:

Your device would need to be unlocked to do this. Therefore, I would consider just having a reminder pop-up with a link to run an action within Drafts to do the processing and sending to Evernote.

So this cannot be 100% automated - it still requires some sort of manual intervention? Because Shortcuts must be run with the device unlocked?

Any recommendations on approaches where it can be 100% automated?

EDIT: I created an Automation to run the Shortcut at a specific time, kept my phone locked, and it did execute. So I guess no manual intervention required.

I was pretty sure Evernote updated required the device to be unlocked. Either I was mistaken or that changed. I’ve moved away from regular Evernote use, so it hasn’t been s I me thing I’ve worked with much for a while, but glad it’s worked for you :sunglasses:

1 Like