Add to Obsidian Note (Daily Note or any other)

I started creating some Actions to ease interactions with Obsidian.

The first two Actions allow you to add the content of Drafts quickly to the Daily Note in Obsidian:

The third Action is very useful if you have different lists or just any kind of note that you often want to add text to. You can configure a list of notes for the Action. When you want to add content from Drafts to one of them you just run the action and select the note from the upcoming prompt.

Add to Obsidian Note

I hope these Actions help you to remove some friction from adding content to Obsidian :slight_smile:

If you have questions or other use-cases that you would like to automate between Obsidian and Drafts, just let me know :raised_hands:

See also the Twitter Thread

5 Likes

Hello FlohGro,

The “Add to Obsidian Daily Note Section” is a very useful action! Thank you.

I seem to have configured it effectively to run, but I am consistently interrupted by two alerts that require my input. The first Alert displays the line after the title of the section following the section selected for adding the note. The second alert displays all of the preceding notes sent from drafts that day. Both alerts require me to click “OK”. How can I avoid seeing these alerts?

thanks for using the action.

can you provide a few more details please?

  1. It would be helpful to see the exact messages that get displayed (you cen censor private content of course)
  2. can you share the configuration you made (the text you inserted into the different “Define Template Tag” steps)

Hi @FlohGro,

Thanks so much for Add to Obsidian!

Can I modify the script so that it sends a selection instead of the entire draft?

You can of course. I modified the „Add to Obsidian Daily Note“ action as an example (hope it works).

You just need to find the places where draft.content is used to get the content of the entire draft and replace it with editor.getSelectedText() to achieve what you asked for.

Let me know if you have issue changing the action

1 Like

It worked perfectly! Thanks so much @FlohGro!!

1 Like

Thanks for the effort of building this Action. I couldn’t get it run though, even though others have been able to. I’ve been able to set up the actions Append to Obsidian Daily Note and Send to Obsidian folder. But this action seems much more complicated to set up. Is there a simple way to complete the action Send to Obsidian Daily Note in order to append in a particular section? And how do you define sections in this action ? Do you enter # hashtags? Thank you

The section can be added with or without hashtags, that doesn’t matter.

It is harder to setup since it needs more complex logic to do what it’s supposed to. Did you read through the documentation in the action directory?

What is your current configuration? Do you see any error or what exactly is not working for you?

Thank you. Yes I went through the documentation, but I didn’t understand everything. On running the action, I get the error “daily notes file does not (yet) exist, create it in obsidian” even though I have a daily note for today in Obsidian.

The two configurations I am not sure about are:

  • dailyNotesFolderPath: In my Obsidian configuration, that path is dynamic, being YYYY/MM (i.e. now 2024/04/). I tried 0. JOURNAL/%Y/%m/ and 0. JOURNAL/%Y/%m but both return the error “daily notes file does not (yet) exist, create it in obsidian”. And Yes, my bookmark (Journal) is configurated to my root journal folder, which is “0. JOURNAL”

How can I code this path correctly?

  • dailyNotesSection: Should I just mention a text within the daily note here?

Can you try setting the folder path to: * JOURNAL/[[date|%Y]]/[[date|%m]]* (no leading slash at the end)
This should then find your daily note if it is existing and synced to your device

Regarding the * dailyNotesSection* this should be a heading in your daily note. E.g. if you have a section „## Ideas“ then you should set this to Ideas

I set it like that . I still have an error indicating it doesn’t find the daily note (which is already created). I’ve found a workaround with another Action which Appends to Obsidian Daily Note (at the end of the note).

Yes sorry I forgot to add that. How do you name your daily note files?
This is necessary for the ‚dateFormat‘ template tag

Without that properly configured the action can’t find your daily note file