Show a daily note in widget?

I’d like to use a large Drafts widget to display my current daily note. The titles of these notes are predictable, but change every day.

Is there any way to set the content of a widget to be a dynamically selected widget? (i.e. figure out that today’s date is 2024-06-28 and then display the daily note corresponding daily note?)

2 Likes

There is not. You could have an action attached to a widget that dynamically located and opened (or created) a daily note when tapped, but that would not display its content.

Probably closest you could come would be if all your daily notes are in a workspace (via tag, or however a workspace might filter them) and use a list widget that filtered by that workspace. If it’s the small widget, it would only show the most recent item. Still not quite what you are aiming for.

It would be kind of tricky to implement, since Drafts doesn’t really have a concept of a “daily note”, per se - and there would need to be built-in logic that created and maintained those to be able to know what to display in a widget.

1 Like

Another possible idea is to just have a draft widget that points to a single static draft that you use throughout the day, and have an automation (via Shortcuts) that ran daily on a schedule that rolled out any content in that note to a daily note for the previous day - assigning any necessarily title and tags and clearing the scratchpad note so it’s ready for the next day.

2 Likes

This is the solution I was leaning towards. (That is, having a static “Active” daily note, and then making archive copies each night.)

I wonder about adding an option to the list view to display the content of the first draft in the specified workspace/location. This would work for me here, since I have a “daily log” workspace where today’s note is in the inbox, and all prior notes are in the archive.

Though I’m also considering trying to build a Scriptable widget to display the daily note.

1 Like

I basically do this, but for a weekly note rather than a daily, so it’s a bit less tedious. I wanted to display the incomplete tasks in my weekly note, so I just duplicate the note every week by hand and delete everything before I migrate what I need to for the week. That’d be a pain to do every day, though.

I wonder if you could use a static daily note which was also a template with date field and anything else you wanted. At the end of each day, you could create a new note with today’s date and the contents of the static note.

For future readers who want do to this same thing, the above is exactly what I ended up doing.

4 Likes

I do the same thing for my weekly / daily notes, I’ll use the app DataJar to store the UUID for the most recent note for a particular project or task or meeting, then recall that UUID to bring up the note I need before the meeting (or whatever) starts.

1 Like

Could you give a more detailed example of your “solution”?

Thanks

Could you give a more detailed example of your “solution”?

Thanks

Based on the post referenced I would imagine you would add one of the Drafts widgets that displays the content of a draft.

Then edit the widget to point to the draft you want to use as your daily draft.

The scheduled shortcut would look something like this - creating a new draft from the content of the draft used for the widget (you would specify the UUID), and then update that original draft to have no content so it starts fresh for the new day. Set it to run in Shortcuts automations based on a time when you want it to run.

I think that should be it. Add the widget and use a shortcut to save a copy out each day to another draft.

Does that all make sense?

thanks,

AFAIK the same shortcut works on Mac also…

@sylumer Nailed exactly what I did. (My apologies for not being able to respond sooner).

Since the widget has to specify the Draft to display, you have to update the content that draft. At the end of each day, I would create a new draft in Archive with a copy of the content of the displayed draft, and then update the content of the displayed draft for the following day.

1 Like