18 Comments
User's avatar
Julie Tran Deily's avatar

Thanks so much for sharing this! I can't wait to add this to my Alfred workflow!

Expand full comment
Robert J. P. Oberg's avatar

I see. No idea how this happened but I don’t see a link between the text box with your note ID and the Bear action. Click where it says Identifier or title, then choose/select variable, and click TheID just below the text box that has your note ID. This should fix at least this first issue. A specific note title or tag are not required for the shortcut to work, by the way, they can be anything. The only thing needed is the ID.

Expand full comment
Totus's avatar

Hi BIG thanks for this. I made this quick screen recording in LOOM to show what is happening (or not happening as the case may be :-). Hope you have time for a quick view.

Thanks

https://www.loom.com/share/ba7bd7dba8784266a004c3cd87e1f884?sid=1446af00-7450-44bd-aa56-a1e21468a2c7

Expand full comment
Totus's avatar

NO worries I deleted everything and started again. Just a thought, the videos you make are great BUT there is a way to make them VERY followable and free for you. Get a LOOM, it is so easy to use and you can show so much in a detailed explainer way.

Expand full comment
Robert J. P. Oberg's avatar

I am just in the middle of upgrading my working desk setup so that it can be easier to quickly shoot videos friction. I usually feel like the YouTube videos should be a bit shorter, more to the point, that's why I've tried to expand a bit here on Substack with text whenever I can. In the future, though, I do hope to maybe post an overview on Youtube and if necessary a more detailed/longer YT-unlisted version here in Substack—if I ever release new workflows or stuff like this. Thank you for your suggestion and glad you got it to work! I was about to mention that if you want the Alfred/Bear shortcut to work well, you also need to have "Allow Running Scripts" in the Shortcuts app settings—since it uses Applescript to grab the source app name + link if you ever use that feature.

Expand full comment
Geir Gotaas's avatar

Hi Robert,

Your set-up with Alfred - Shortcut - Bear facilitates just the kind of workflow that I'm looking for. However, while the part of the workflow that creates an entry in Bear with contents in the clipboard, nothing happens when I try to create an entry from text selected in Safari or Mail (with a link to the website or email).

I'm using version 2.0.15 (12062) of Bear, MacOS Sonoma 14.0, and version 5.1.3 [2175] of Alfred.

Any thoughts on where the prolem might be, would be much appreciated!

Best regards,

GeirG

Expand full comment
Robert J. P. Oberg's avatar

Hi! Just saw this. I went ahead and tested. I'm on the latest Sonoma, Bear, and Alfred releases and the Shortcut works as expected on my side. If it doesn't for you my guess is that it has to do with Applescript permissions. You can go to the Shortcuts app/Shortcuts menu/Settings/Advanced and make sure Allow Running Scripts is selected there. It's the only way to do it, as far as I know, since the Shortcut is communicating with Safari or Mail through applescript. Other than that, if it is already activated, I'd try reinstalling the workflow.

Expand full comment
Geir Gotaas's avatar

Perfect, that solved the problem - thank you kindly!

Regards,

Geir

Expand full comment
ScottC's avatar

Robert:

I'm using Bear Version 2.0 (10209) and I've not been able to get the Alfred triggered Shortcut to work. I've downloaded and installed the Shortcut and inserted the Bear Note ID but still no luck.

I'm wondering how to figure out why and how to fix.

Step 1: Do you know if your Alfred triggered Shortcut works with Bear v 2.0? If it is compatible, can you suggest how I might debug to see what I'm doing wrong? I'd like to use it.

By the way, I just stumbled upon your Substack account and I'm looking forward to keeping up with your posts.

ScottC

Saluda, NC

Expand full comment
Robert J. P. Oberg's avatar

Hi! Yes, it works on Bear 2.0 without issues. Do you have a way to check if the shortcut is working on iPhone? That’s a way to start checking if the problem originates in the Shortcuts app or Alfred. Another test you can do, on Desktop, is you can go to edit the shortcut and at the very top, where it says “If there’s no input:” change it from “Continue” to “Ask for Text” (remember to change it back after testing!). Now run the Shortcut by itself on Desktop—we are still testing the Shortcut functionality without Alfred. When it asks for text, insert “∞c∞ TEST” just like that, without “”. TEST should have been captured to your specified note ID. Assuming that it was captured to your note this way but not using Alfred, then my guess is that it’s because of a permissions error. Alfred triggers the Shortcut using Applescript. You can check by going to the privacy settings of your Shortcut (https://i.imgur.com/zN6thLN.jpg). If you can’t reset the permissions there the best is just reinstall the Shortcut and wait for the notification to popup and accept (there’s just no way around the permissions setting for this to work).

Expand full comment
ScottC's avatar

Thanks, Robert.

Thanks, Robert:

I ran the Shortcut from the Desktop and received the error: "Note not Found." See screenshot below showing all the steps leading up to the error.

https://imgur.com/7QobiFK

I double-checked the Note Identifier for the Bear Note titled, "InBox" with a tag, "#InBox". The Note ID is correct in the step above "Get note."

I also checked the Privacy Setting in Shortcuts per your suggestions and confirmed that the shortcut was allowed to access Bear.

I have not done any of the other suggestions in your email replay (Thank you by the way) because it seems like this is probably the root of the problem. Any more suggestions?

Would you suggest I create another note called InBox and delete the other one?

Thanks for your help on this.

ScottC

Saluda, NC

Expand full comment
Robert J. P. Oberg's avatar

I see. The note title or the tag are not necessary for the Shortcut to run correctly (it can be anything), just the note ID is important. From the screenshot you shared with me I think I see an issue: there’s no link between the text box with your note ID and the Bear action. No idea how that happened. Click where it says “Identifier or title”, then select/choose variable, and you’ll click TheID just below the text box with your note ID. That should at least fix this first thing.

Expand full comment
ScottC's avatar

Just in case I accidentally erased the missing linkage step in Shortcuts, I downloaded the Shortcut again using the link from within Alfred and also from your Feb 17 post:

https://afadingthought.substack.com/p/note-taking-with-bear-and-alfred?utm_source=profile&utm_medium=reader2

Both are missing the link between the link between the text box with the note ID and Bear action. Is there an updated version of the shortcut with the missing linkage between the note ID and the Bear action?

I then followed the instructions from your reply to add the missing link, "Click where it says “Identifier or title”, then select/choose variable, and you’ll click TheID just below the text box with your note ID."

I assumed the node you were describing is the Bear action 'Get note' because that's the only one with 'Identifier or title.' Clicking on those words allowed me to enter something new but it didn't allow me to choose or select a variable. At that point, I assumed I needed to add a Shortcut action above the Bear 'Get Note' action to pass the Note ID entered in the Shortcut action immediately above.

I searched for an Action called, Select/Choose variable but didn't find one in the list of Shortcut Actions so I tried adding a 'Get variable' and 'Set variable' Action between the step holding my Bear Note ID and the Bear 'Get Note" action but both of those failed. The Bear action 'Get note" reported 'Note not found."

FYI ... I'm using Shortcuts Version 6.0 (1505.2)

At this point, I'm back to the shortcut linked to Alfred and your Feb 17, 2023 post. The first few steps in the Bear Capture shortcut I have are shown in the screenshot below:

https://imgur.com/8KFG3cS

Would is be easier for you to send me similar screenshot with your Note ID and any other private stuff blurred out?

Sorry to keep bugging you on this. But, if the Bear Capture Shortcut is really missing an important step, I thought you should know that the links from Alfred and on your Feb 17, 2023 post both are missing the same step.

ScottC

Saluda, NC

Expand full comment
Robert J. P. Oberg's avatar

No worries, thank you for letting me know about this. I wasn't on my computer last time so I did't link that box for you, but I went ahead and downloaded the Shortcut from the post and it's true, it also appears without the link here. I am assuming that it's because I am now using Bear 2 Beta (I wasn't when I posted this), and the Shortcut actions may have been updated between versions causing this. I just did that small change, try now:

https://www.icloud.com/shortcuts/283ff117ff03422692dd697a25ac8b8b

Here's the way I did it, by the way: https://i.imgur.com/9Ox1LOV.gif

Thanks again for letting me know! I'll put a note on the post. I continue to receive messages from people saying it works for them, so I am assuming they are not on the new Bear Beta yet.

Expand full comment
ScottC's avatar

Thanks, Robert.

Running the Shortcut from the Shortcuts app and from Alfred works now. Appreciate your help on this.

ScottC

Saluda, NC

Expand full comment
Rafael's avatar

Dear Robert,

Thanks a lot for sharing your Bear Workflow! That's amazing!

I'm also interested in shortcuts (3) and (4). Could you please share them as well?

Best,

Expand full comment
Robert J. P. Oberg's avatar

Thank you Rafael, I am so glad this is useful to you! Thanks for your interest in the other shortcuts! Number 3 is a bit too complicated because it has to do with note design, but let me put it in my to-do list and will see if I can simplify it enough to write an article and share it. Won't be in a few weeks at least because I'm swamped with things to do right now though. For the shortcut I use to bring Readwise highlights into Bear I have two versions. I have quickly edited them and simplified them for you, not sure if they help but at least it can give you an idea of how they work. I have one version which imports everything, notes, tags, the URL for the source... I use this one for articles or similar things. Here it is: https://www.icloud.com/shortcuts/0996c1477f3243c9933043be9ac96055 . And I also have a simplified version, which removes tags, notes, or URLs. I use this one for Books, because I usually highlight a lot more there. https://www.icloud.com/shortcuts/f417c1405d854b5695c5d7975c141b41 . The note design, again, has to do with how I have everything set up here. To run any of these, if you are on your Mac you FIRST have to copy the markdown file you downloaded from Readwise. Just right click, copy on the .md file. Then run the shortcut. If you are on your phone, the markdown file usually opens in a Safari window, you can share directly from there to the shortcut. Like I mentioned I just quickly modified them for you, sorry if there's any bugs!

Expand full comment
Rafael's avatar

Thank you very much, Robert! They are very useful as I'm learning how to make my own shortcuts. All the best!

Expand full comment