Bullet journaling for Obsidian

Hi I’m new to drafts, hopefully someone can help me with this, i found the action for “Bullet journal” in the directory, so can this be adopted to be used with Obsidian using the url scheme?

I braindump a lot of things into Drafts and would like to have each line that is tagged with symbols appended to different notes in obsidian. so exactly as this action does, but it does not support Obsidian now.

the script have this now:
onst draftLines = draft.content.split(“\n”);
const tags = draft.tags;
const dayoneURL = “dayone2://post”
const fantasticalURL = “fantastical2://x-callback-url/parse”;
const goodtaskURL = “goodtask3://x-callback-url/add”;
const omnifocusURL = “omnifocus://x-callback-url/add”;
const thingsURL = “things:///add”;
var dayOneLines = [];

// Actions for sending journal entries to various apps

function collectForDayOne(entry) {
dayOneLines.push(entry);
}

function sendToFantastical(entry) {
var cb = CallbackURL.create();
cb.baseURL = fantasticalURL;
cb.addParameter(“sentence”, entry);
cb.open();
}

function sendToGoodTask(entry) {
var cb = CallbackURL.create();
cb.baseURL = goodtaskURL;
cb.addParameter(“title”, entry);
cb.open();
}

how can i tweak this so it can work with Obsidian?
what would be the script for this?

grateful for any help

Hi, please link the Action (ActionGroup) you’re referencing to in your post :), this helps to understand where you’re coming from.

regarding your request:
You can use the Obsidian Advanced URI to append text to different notes in obsidian.
To help you further with the request it would be great to have a more detailled example of what you want to achieve. A few questions that might help to detail your request:

  • what symbols do you want to use to identify the different destination notes in Obsidian?
  • what are the names and vault of the different notes?
  • do you want to append or prepend the lines to the Obsidian notes?
  • how would an example input look like (an example draft with your brain dumps)?

I think your Script example is not complete right now, this is doing nothing at the moment. If you copied it from somewhere, please link to the action you used. if you use ticks ``` above and below the code it will be formatted nicely in the forum

1 Like

sorry about this! newbie mistake

anyways i got the action from here

so idea with similar to the action above
“-” will be to day one (it currently works already)
“@” will be to busycal
“#” will be to obsidian daily notes section
(i would like to append -[ ] to lines that have “#” so i don’t have to type it, and also is it possible to replace the tags #t to #today, #q to #quick, #u to #urgent)

“%” will be to create a new note in obsidian for projects (with template)

  • the # lines will be sent to the daily note today to specific section and appended (i have the url for that already)
  • the % lines will be created as a new notes with template

it will only be one vault

an example for the daily braindump would be

task 1 #t
task 2 #q
task 3 #u

  • random note 1
  • random note 2
    busycal @
    new project %

Currently i know how to extract the lines with # to a new note and run the “append to daily note” Action but I’m hoping to make this easier to do this in one go if possible, let me know!

Again really appreciate for the help

no problem :wink: happy to help!

I think you’re using the Migrate Journal Items Action of that Action Group right?

I assume your input should look like this to always have the identifying token at the beginning of the line to define where it should go, at least thats how the Migrate Journal Items Action decides which url scheme to call witht he rest of the line.

# task 1 #t
# task 2 #q
# task 3 #u
- random note 1
- random note 2
@ busycal
% new project

This sounds like you already started modifying the Script step or create something new, can you post where you’re currently at so we can continue from there?

To do this in one go I still think you should use the Obsidian Advanced URI.
If you have a look at the Writing actions, it allows you to append text to a note. The info box at the bottom also states that you can add a “heading” to add text to a specific heading in the note using the heading as Navigation marker.

hi there!

I guess my question is this, the “Append to obsidian daily note” is not a script,

but the “Migrate journal items” uses script

so how can I make this into one action?
What is the script for obsidian using the obsidian URI?

The solution I’m using now is actually using

to extract hashtagged items into a new note
then use the “Appendd to obsidian daily note” action

Ok now I understood where you‘re coming from.

The Append to Obsidian Daily Note uses the Obsidian advanced Uri with a callback URL to add the text to the daily note. This is what I already suggested that you can use for you‘re usecase :slight_smile: so we are on the same page her :slight_smile:

Nowthe thing is that the Migrate Journal Items action uses the first character in a line to distinguish where the text of the line should be send to (this is from the bullet journal method).
If you want to continue using this Action then your braindump from the example has to look as i suggested (just one remark: using „#“ at the beginning of the line will not look good with markdown syntax).

If that is what you want to do, then we have to implement the additional „marker“ (the „#“) and the function to send text to Obsidian into the Migrate Journal Items Actions, which also prepends the „- [ ]“ to each line (which is definitely possible).
I think busycal is also not supported in that action.

yes I have no problem with the # in the beginning of the line, what I’m stuck is how do I add the “Append to obsidian daily note” action inside the “migrate journal items” action group. sorry I wasn’t being clear.

and other then prepending the - [ ] , is it possible to change to tag as well? i.e. #t to #today, #u to #urgent

Thanks again!

so a sample note would be - (I actually don’t mind using another symbol if “#” is a problem, “&” can do too)

#t task 1 (to obsidian daily note -[ ] task 1 #today)
#q task 2
#u task 3

  • random note 1
  • random note 2
    % new project

:slight_smile: modified the action and shared in the repository, you need to adapt the two variables in the last script step:

const vaultName = "FlohGro"
const sectionName = "Test Heading 1"

change FlohGro to the name of your vault and Test Heading 1 to the Heading the text should be added to in Obsidian.

I used “&” as marker for tasks to obsidian, so the input text

& task1 #u #q
& task2 #t

results in:
CleanShot 2023-04-12 at 20.01.47

Disclaimer: I don’t have busycal and i just created a callback url that might work, but I’m not sure with that so you need to test that by yourself and let me know if it also works with events.

here’s your action: Migrate Journal Items tb12 | Drafts Directory

Let me know if it works, and if not please provide as much details as necessary to help me reproduce and fix the issue :slight_smile:

wow this works perfect! so amazing! thank you

the busycal works but it shows ?x-success=drafts5-callback after the title, any idea how to eliminate that?

i have one more question, is it possible to have the lines that were sent to the different apps deleted after its successful?

I pushed an update of the action please download it again and add your settings (vault and section name).

I used a callback url with my first try, which of course adds some callback parameters to the url. busycal doesn’t use the callback url scheme so I changed it to just open the URL… I don’t know if busycal can handle this when you have multiple events in one draft, so you need to try that.

included in the new version.