Bear: grab tags and present prompt to choose

This action requests the list of used tags from Bear, then presents a picker for you choose tags from. Great for enforcing tag discipline so you don’t end up with “note” “notes” and “Notes.” After you’ve chosen the tags, they will be put at the bottom of the draft and the whole thing will get sent to Bear.

The first time you run it, it will request your Bear API tokens for all devices, so have those handy. You can retrieve the token for each device from Bear in Settings—>General—>API Token. Unfortunately, each device you use will use a different token. Hopefully you only have one iPhone and one iPad—if you have multiple of either I’m pretty sure this won’t work right.

Note actually, I see now that the Draft isn’t updated with the tags at the bottom. I’m not sure why this is, because the correct text is sent to Bear and “draft.update();” is called. Maybe someone has a fix?

Also: if anyone would know how to edit this script to get two columns for the tag list, for those of us with long list of tags, that may work better. Although, I’m thinking that columns aren’t supported for the “select” prompt field and that the “picker” prompt field wouldn’t work in this case where you want to choose multiple values. Happy to be corrected though!