This macro directly edits the same markdown file that is seen by Obsidian. Whenever Obsidian Sync is triggered, it sees that this file inside the vault folder has been modified and will sync it, even if the file has never been opened in Obsidian.
Note: At the moment, Obsidian Sync only runs when Obsidian itself is in the foreground.
So you can open Obsidian to bring it to the foreground (any page will do) and trigger synchronisation of all files modified by the macro.
@the0 and everyone else in this thread - there is a very easy bulletproof solution for the syncing problem:
Open Obsidian as the first step in your automation
I’m using Automate on Android, but I’m sure you can do this with MacroDroid too.
Here’s a video. I tell Obsidian to launch, and then pop up the input box for my new task. By the time I’ve finished typing the task, Obsidian is already opened and syncing away. This has completely solved any sync-related quick-add issues for me.
Note: I am still directly editing the Markdown file as per the first post, I’m just also opening Obsidian so it can start syncing while I enter my text.
Even still, if you add tasks multiple times per day it’s multiple chances to get all synced up. And Obsidian doesn’t stop syncing immediately when you switch away, it will keep going for a while.
And really, how often do you in your day-to-day use do an overhaul that requires major syncing?
Well even if its just 5-10 seconds of syncing, if I want to append something very quick to the same note (like todays daily note) frequently across devices, I’m still typing into the textbook and just waiting and hoping it has synced.
Maybe I only have the 10+ sync thing happening once/week but either way it’s a pain waiting, hoping things are synced before hitting enter. That’s why I created a shortcut that adds to a per-device note.
iPad adds to the iPad note, iPhone adds to the iPhone note, etc. I have another automation that later combines them daily (with lots of delays between steps for syncing)
And this will effectively guarantee that your per-device note will be synced after you finish your quick append, even if you immediately switch away after inputting your data.
I’m not really sure what you’re trying to argue - they’re complimentary approaches which work together to improve your sync success rate.
@the0 Thank you for making the guide for the shotcut in MacroDroid, altough I’m only halft way there. I have copied your setting for the shortcut, but when I make a note the output/text in Obsidian is this: - {lv:input}
Is there a simple solution or did I miss something? Also Is there a way to incorporate the time of day with adding notes to Obsidian through MacroDroid?
I faced this same problem a few times and looking for a solution I found this post, which sparked an idea in me.
Just yesterday I made public an application (called CopyCapture; so yes, I’m aware it’s not the best of names tho) that I’ve been using for a while to capture snippets, reminders or ideas quickly (and then save them all at once in Obsidian).
A fast simple markdown note app called Notes by a Dev named Bill Farmer availablenin F-droid and Github a way to quick add notes that can automatically have timestamp in the file name.
I had the same issue with {lv:input} appearing in the note, but was able to get the instructions to work by changing {lv:input} to {lv=input} in the MacroDroid “Write to File” action.
Thanks so much for the OP and clarification here, @the0. Just got it setup, and it’s working well.
I did modify the Macrodroid macro to open Obsidian as the first action, to begin sync as @AlanG suggested as a solution for the syncing problem.
@hector6872 - I’ve just installed your app, and if I understand correctly, it looks like it’s a glorified clipboard to use the system share to add to, and then all at once, copy all items from and manually add to Obsidian. Is that correct?
Sort of. The main idea behind it is (for example): you browse a website, send the main/most interesting points to CopyCapture (or add them manually), then merge it and share it in an single Obsidian note. Which is (in my case) more productive than using Obsidian directly.
Fastest way on Android I’ve found so far (and it’s built to sync with Obsidian): Fleeting Notes. Web app, Android app, and matching obsidian plugin, sync can be one-way or both-ways. The client source code is open source (backend isn’t yet, as it uses “nosource” solutions that make opensourcing a challenge).
That said, it’s more a “single channel” (i.e. you sync into a single location in a single vault). Think of it as a Google Keep front-end on one of your notes folders, though with some creative tagging and inbound processing in obsidian, you can do much more.
Very fast, frictionless. It could use some polish, but it’s been easy to setup and use.
Hey Im new here.
I come up to this when I already had a workflow for quickCapture established.
I use the App “Notes” from Simple Mobile Tools. (in the future hopefully from Fossify forked and published)
Within that App you can open any plaintext file located in your Storage.
So I choose three Notes from Obsidian and put them via a Widget on my homescreen.
Its opening very fast
you can read and change everything what is yet in that note
you can scroll from the homescreen in the widget through the note