I have an action that worked for thousands of journal entries. It’s not working as expected now. I also can’t remember how to post my code in here without it being reformatted…so I’m just going to attach a screenshot of the code. Would someone tell me how to post code please.
Originally the first line of code would be the date and time and the first line in the Evernote note. The second line of code would produce a green ‘personal journal’ entry on the second line of the Evernote note. The third line of code is the draft and would produce everything in the note from the third line down depending on the draft. Now the ‘personal journal’ and some of the Draft end up on the first line of the Evernote note. Only lists seem to stay out of the first line of the Evernote note.
Can you add your action to the directory as an unlisted action and post the link here so we can download it and look at the set-up? Note that actions can have multiples steps, multiple settings, and are not necessarily code based. As a result sharing a link to the entire action ensures that we get an exact view of what is being used.
If you can’t post the action, please provide the link to the action in the directory that you downloaded (default, pre-installed actions are also in the directory).
In order to investigate what is going on we need to see the details of all steps.
It would be useful to have a worked example too.
If you copy and paste the content of an example Draft into the forum, you can wrap it in triple back tick characters to display as a block of code.
To clarify things…I was using an older iMac with an older OS. I hadn’t updated the OS or many of the apps in some time. I JUST purchased a new M1 MacBook Air with Big Sur and downloaded the latest versions of all of my software. My iMac fried and I don’t have access to it anymore.
I took your action and blanked out the notebook parameter in the Evernote step. That sets it to just use the default notebook.
With that amendment I then ran the action against the following two sets of draft text based on your screenshot examples.
1. Test list
2. Test list
3. Test list
1. Test list
2. Test list
3. Test list
For Info: if you copy them, you should pick up that I’ve used double spaces at line ends on some of the non-list lines to force a newline. Whitespace characters are not shown with markers in Drafts, which is one of the reasons to recommend plain text code blocks over screenshots above.
Which looks exactly like the result you are after and used to get.
A big difference for me I guess is that I ran it on iOS, as that’s what I had to hand. While I do have a Mac, it isn’t an M1 Mac, and it isn’t running Big Sur (I’ll update the OS at some point); so any testing I do may well be moot. I’m also on the Drafts beta, so there could be another variable factor there, though I don’t recall any changes since the last public release that could account for this.
Therefore my suggestions for further testing would be:
Someone else tries to reproduce this on an M1 Mac running Big Sur and the non-Beta Drafts app.
You try the acton on another device if you happen to have one available.
I do have an iPhone…which is where I run the action from. While I’d like to be able to use my desktop for journaling, Evernote is a pain with their API development. I send them complaints in feedback weekly.
With regard to the action, I’m not sure I understand. You modified it and it produced the output I desired? Initiating it from an iPhone? If that’s the case, would you mind adding the updated action the directory and posting the link? I’m not very good at this sadly.
I keep considering moving away from Evernote as well. They are a pain. But I have a TON of content utilizing menus and links that will all be lost if I move it somewhere else. I even purchased DEVONthink recently when I was in a really bad mood regarding Evernote.
Thanks @sylumer. It’s interesting. When I run the action with the default notebook, it runs rapidly and the result is as expected. When I add a specific notebook (Journal in my case)…the action takes significantly longer to run and the results are completely different. Sounds like a bug to me. Although with the Evernote API being a problem…it might not be fixable.
There are a lot of aspects of this that could result in bad performance. Evernote’s API does not have functions to doing appending-prepending, or to locate notebooks or notes by name, per se…so Drafts is doing some clever bits to make that happen. Some things to check:
Is the note you are appending to large? You should use date tags in the note name to roll over notes by week/month or similar depending on frequency of your journalling. To append-prepend, Drafts has to download the full note, make the changes, and upload the full note, so strategies to keep the note a reasonable size automatically are good.
Do you have a lot of notebooks? Drafts has to get the list and loop over them to locate the correct one.
Add the default journaling examples use a rollover naming scheme. See Append to Evernote Journal. It just involves including a date tag variation in the name of the note, like Journal-[[date|%Y-%m]], which will generate notes like Journal-2021-03, Journal-2021-04, automatically creating the new note for each new month the first time you use the action in the month.