Syncing Drafts with Obsidian

Hi all,

How can I have my drafts automatically synced with Obsidian? Meaning when I write a note on Drafts it automatically goes on Obsidian rather than me copying it.

Thank you!

Drafts does not store content in files whereas Obsidian does, so you cannot sync drafts automatically.

You can, however, have an action that exports a drafts into an Obsidian vault. When you have completed your draft, you would select the action to trigger the export. Drafts doesn’t auto trigger any actions so this would have to be manually triggered; though I guess it is possible to schedule actions to run externally to Drafts, but this wouldn’t be able to assess the “state” of a draft.

There are a number of posts already that cover how you could use actions to export to Obsidian.

This thread:

Second part of this response:

This thread:

Hope that helps.

2 Likes

Yes it does thanks! Haven’t worked out all the kinks but thanks for the guidance.

I’m very interested by this topic.
Yesterday I discovered that Drafts cannot save (export) a drafts note into a folder outside its container (in iCloud). It is not due to Drafts but to IOS.
My intention was to save drafts notes with an action into the obsidian folder/vault.
At least it is not possible outside Drafts folder, at least in IOS.
So I made up my mind: whatever I write with Drafts for Obsidian, is considered as a draft or an inbox item.
And I think it is a good concept.
So we add an integration step 1) write in Drafts 2) export in, a folder (could be in dropbox) 3) copy in a folder within obsidian vault 4) evaluate and adapt each note to integrate into obsidian.
I already placed my vault into a 1Writer folder but Drafts is better to create notes in IOS, I don’t see the advantage of 1writer

If you really needed to do this there are apps such as Toolbox Pro (for Shortcuts) and Scriptable that support folder bookmarking. This feature allows you to work around the limitation imposed by the sandboxing.

Drafts technically can save outside is own folders, but this involves manually selecting a destination each time.

The advantages are that 1writer works directly with the file system such that it is therefore easier to view and edit files in the vault. Drafts can do it, but it is a little bit of extra effort. Round tripping modifications via import/export in Drafts is certainly not as easy as just saving in 1writer; though custom actions can help Drafts achieve easier round tripping.

I have a few folders in Draft’s iCloud Drive folder which are watched by Hazel. Hazel then either triggers an AppleScript or moves the text file to a different location (usually Google Drive).

Perhaps Hazel might be of use to you?

I use the same method with files created by Shortcuts. In all cases, it works very well.

That being said, I do have an always on Mac Mini running to keep this active at all times.

1 Like

My obsidian wiki is in a free Dropbox account. I just have actions that save to Dropbox, with a particular tag and then I have a process at the end of the day to go and process new Orphans in Obsidian with that tag.

1 Like

I have been thinking about this also. I love the ability to get text out of my head fast, but proces it in Obsidian instead of in drafts.

Recently “actions for obsidian” (https://obsidian.actions.work/) became available - I am trying to build a workflow with this to have my notes auto-exported. Perhaps it will work. :crossed_fingers:

I build this workflow in Shortcuts. It fetches an array of all the drafts and runs a loop that creates a note from each of them.

I used the “actions for obsidian expansion” that I mentioned in my previous post.

Here is the link to the workflow:
Shortcuts

To get it to run automatically, you can set a schedule for running the shortcut with something like Hazel

I also wanted to create an export from Drafts to an Obsidian Inbox note. My solution was simple. The Drafts files are saved as .txt by default (if there’s a way to change that to .md, please let me know), but I simply use the Option + Command + S shortcut on a note and then I have a prompt for naming the file, which is already selected to save in the Drafts folder inside my vault. It’s automatically visible in my vault. However, in order to change the .txt to the .md file extension, I used the txt-as-md-obsidian plugin.

Edit: The plugin makes .txt files readable as .md files and shows it’s .txt next to the file name.

From this point on, I think the only thing that’s left is to just manually move the draft or do what I want to do with it in the vault. I don’t see a place to further automate or improve this; it’s quite simple.

Check my response to your same post on another thread. Unless I’m missing something the other methods should be more streamlined than the multiple steps you have.