KeyboardMaestro script for meeting prep through Things 3 and Bear

Hey Folks, I’m trying to make KeyboardMaestro process information for meetings through Things 3 and Bear.

Gather Information about Meeting

When I schedule a new meeting, I’d like to trigger KeyboardMaestro to prompt for three variables (to be used in URL scheme for Bear and Things):

  • Name/topic of meeting (Variable: Name_of_meeting)
  • Date month (variable: Month_of_meeting)
  • Date day (Variable: Day_of_meeting)

I recycled a date picker solution that defaults the dropdowns for month and day to today’s date, but can select a day in the future when needed.

Create Things Task

Next, I want to use the Things URL builder to generate a task to prep for the meeting with the start date (“when”) as today and due date (“deadline”) as the meeting date selected above. That due date would concat as:


So the full Things URL would be:


Problem 1

I tried adding the variable Name_of_meeting and the concatenated yyyy-MM-dd date into the URL above, but the spaces in the text and the fact that KM needs the variable wrapped in percentage signs like %Variable%Your-Variable-Here% breaks the link.

Create Bear Note

Assuming I can get that part to work, the next part of the macro would generate the Bear note. Again, the variable syntax seems to be where my plan is breaking down. Using the Bear URL builder, I create a link for a new note with:

  • Title: Meeting notes:
  • Tags: Meeting_Notes (and a couple others)
  • Text: Some basic templatized text I use for meeting notes in markdown format.
  • New_Window: Yes

So that URL Looks like:


Problem 2

I’d like to have KM insert the Name_of_meeting variable, followed by a space, a dash, and a space, then the yyyy-MM-dd like we built for the Things due date. So the title of the note would be Meeting notes: NAME OF MEETING - 2021-03-01. Again, adding the variables with KM’s syntax into this URL breaks it.

Return with the Bear Note Link for Things

And the final step I’m trying to include would be to grab the Bear note link (accessible via simulating the keyboard shortcut to copy that link), then paste it into the Things task note section.

That would involve grabbing the Things task link during the first step above (again, via a shortcut I assigned within MacOS’s native Keyboard shortcuts) and storing it as a variable to be used in this step. After creating the Bear note above, I need to grab the Bear note link as described, trigger this Things URL to go back to the task, simulate Enter to expand the task, simulate tab to get to the notes section, and finally, to paste the Bear URL.

WHEW. I know this sounds like a lot of work, but I keep all my work notes in Bear, and I schedule tons of meetings as part of my job. This one automation would save me literally hours and hours every year.

So as called out above, my main issue is the way to integrate KM variables into Things and Bear URLs, given that the percentage signs throw it all off. Any ideas?

Do you have a sample of what you currently have to work from? I have a feeling what you’re running in to is URL encoding issues.

Hey - I can’t seem to post a KM macro file here. I’ve saved it in a Dropbox folder, if that is accessible? Thanks for taking the time to look!

So pretty much I did the same thing you already had but used bash to be able to insert KM variables into the URL

Hey Dustin, that fixed it! Thanks very much for your help, and for this handy lesson in how to get around url schemes with conflicting syntaxes! Really appreciate your assistance.

Spoke too soon! Slight issue. This works when the date selected is today, but if I select a date in the future, I get the following error:

It only fails and gives me that error if I try to run the macro via the menubar. If I run it from the editor window using the play button at the top, it does work for future dates. Weird.

Any ideas? I’m looking at the script and don’t see what would be different about today vs. any other.

It wasn’t a future date but a title with spaces. I’d forgotten to url encode the variables :sweat_smile:

1 Like

Hey Dustin, that fixed it! Thank you again so much for your help with this. You’ve saved me so much time!

1 Like