API to get the space for the journal?

Is there any way how to get the ID of the space for the current day (and if it does not exist, to create it automatically)? :slight_smile:

I am making a small program for Slapdash (https://slapdash.com) that allows me to send text directly to favorite spaces from anywhere on my computer.

2 Likes

Does this help you accomplish what you need?

1 Like

Almost, I guess? :slight_smile: I want a route to today’s journal and if it does not exist, create it.

1 Like

You can add some logic so it pulls today, it won’t create though.

I use that route to send stuff to today’s journal with Siri Shortcuts all the time. And I use /new/tomorrow everyday so the next days space is always ready.

3 Likes

I guess I could create a script that would get all spaces and then filter them, and if the journal for the current day is not found, then create one. However, I am afraid that it would be rather complicated for me and relatively slow to proces.

1 Like

If it helps here is the Shortcut I use. Works like a charm and super quick: https://www.icloud.com/shortcuts/a9be713b13ef43a5a8f7ecaf4ea53c03

If you can, I would try automating the creation of tomorrows space separately with the url so you don’t have to worry about if the days space is created.

3 Likes

A very nice code! I have to do it JavaScript but I always admire MacOS`s tools like Shortcuts, Automator, BetterTouchTool etc. On Windows, it is much less user friendly. Luckily, I have an older Mac to look at your code! :slight_smile:

3 Likes

Just adding my support for this – would be a huge unlock for building tools on top of Kinopio.

3 Likes