Quick way to add or append notes without opening Obsidian (Android tutorial)

Issue

Opening Obsidian on Android is slow, so are all solutions that uses URI/intent to interact with Obsidian, for example:

This becomes a pain point, especially with notes that usually taken on-the-go, such as:

  • Reminders
  • Fleeting notes
  • Time log entries

Solution: Edit markdown files directly

demo

Apps required

Set up

MacroDroid

Create a new macro QuickAdd in MacroDroid with the following settings:

  • Trigger:
    • User Input > Shortcut Launched
  • Actions:
    1. Variables > Set Variable
      • Select [New Variable] to create a local variable input for storing the QuickAdd input:
        • Select Local
        • Name: input
        • Type: string
      • Select [User Prompt] to define the overlay prompt:
        • Title: QuickAdd
        • Un-check Display existing value
    2. Files > Write to File
      1. Folder: <YOUR_DAILY_NOTE_FOLDER>
      2. Filename: {year}-{month_digit}-{dayofmonth}.md (Use “…” to insert other fields)
      3. Enter text: \n-[ ] {lv:input} (This will make a new line, insert a checkbox followed by the text previously stored in the local variable input.)
      4. Select Append to file

Home widget

The macro can be triggered using the widget MacroDroid Shortcut. The icon is customisable.

Optional: Quick Settings (notification tile)

Although one can create notification tiles directly from MacroDroid, extra app permission must be granted to the app to do so.

The same can be achieved with the Quick Settings app:

  1. Shortcuts > App & Shortcuts #1 > Enable tile
  2. Edit the notification tiles, find the Application & shortcut tile
  3. MacroDroid Shortcut > QuickAdd

Inspiration

Cool & useful Android shortcuts (made with MacroDroid) (and a tutorial on using URIs as intents on Android)


P.S. The previous topic was deleted because I would like to clarify the use cases, but it was no longer editable.

9 Likes

Do the file sync without opening Obsidian?

1 Like

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.

1 Like

I was hoping that wasn’t going to be your answer. I’m glad to see I’m not the only one who wants background sync. Thanks for sharing that link.

I really dig your solution, and once the sync issue is addressed, I will likely be using it.

To avoid sync conflicts, You can have a dedicated “inbox” note for each device.

2 Likes

@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 :grin:

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.

ezgif-4-4cb450d5a5

Here’s the Automate flow, very simple:

And the Automate flow itself if you want to import it:

5 Likes

If you didnt add a 40mb file recently, or do some other overhaul that requires major syncing

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).

Try it out and let me know what you think :slight_smile:

DISCLAIMER: there is neither self-promotion nor search for free leads. The app is completely free and has no ads or in-app payments.

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.

3 Likes

Sorry for the late reply. As @nicholassdesai pointed out it should be =. This is what I use for Obsidian v1.4.9, MacroDroid v5.37.12:

\n- [ ] {lv=input}

Hope that helps.

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?

1 Like

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.

2 Likes

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.

  1. Its opening very fast
  2. you can read and change everything what is yet in that note
  3. you can scroll from the homescreen in the widget through the note