Apple shortcut to capture text by editing .md files directly not reflected in Mobile Vault, instantly avaiable on laptop

It’s been a while since I fooled around with Siri Shortcut shortcuts and iCloud (meh)…

You need to tinker with the shortcut to prod the file into being indexed or uploaded into iCloud.
I quickly copy-pasted your lengthy stuff into ChatGPT and prompted it with what I had in mind:

  • Is there something we can do to force the iCloud upload or creation? Like ‘touch’ the iCloud file as in Unix, or create the file outside iCloud and move it to iCloud or something to make it stick?

Response:
This is likely an iCloud syncing delay issue rather than an Obsidian-specific problem. iCloud Drive on iOS does not always sync files immediately, especially when the system is under low power mode, on cellular data, or background activity is throttled. Since your Mac updates instantaneously, it suggests iCloud syncs properly on macOS but experiences delays on iOS.

Potential Fixes & Workarounds

1. Force iCloud Sync with touch Equivalent

iOS does not have a built-in touch command, but you can rename the file slightly to force iCloud to reindex it:

  • Modify the file name slightly in the Shortcut (e.g., Inbox.mdInbox_.md → rename back).
  • Instead of renaming, move the file out of iCloud Drive and back using the Shortcut.
Shortcut Adjustments

You can try:

  1. Write to a local “On My iPhone” folder first and then move the file to iCloud.
  2. Duplicate the file and delete the old one to force iCloud to register the change.
  3. Append text, then use a dummy update (e.g., change a timestamp in metadata).

2. Force iCloud Drive Refresh in Shortcuts

Try using the “Get File” action on the iCloud file immediately after modifying it to force iOS to acknowledge the update.

  • Step 1: Append to the .md file in iCloud Drive.
  • Step 2: Immediately use the “Get File” action on the same file.
  • Step 3: Open Obsidian (optional) to see if it detects the change.

3. Make Sure iCloud Background Sync is Enabled

  • Settings > Apple ID > iCloud > iCloud Drive → Ensure it’s on.
  • Settings > Obsidian > Background App Refresh → Enable it.
  • Settings > Battery > Low Power Mode → Ensure it’s off (Low Power Mode slows background sync).
  • Check Storage: Go to Settings > iCloud > Manage Storage > iCloud Drive, ensure there’s no “Sync Paused” or storage issues.

4. Open Obsidian After the Shortcut Runs

If iCloud sync is delayed but works instantly when your Mac is open, Obsidian might be relying on macOS to detect changes rather than iCloud alone. You can try:

  • Manually opening Obsidian after running the Shortcut.
  • Running a Shortcut that opens Obsidian after the file is modified.

5. Use icloud.com to Check Sync Speed

After running the shortcut, check if the update appears in icloud.comiCloud Drive.

  • If the file updates there immediately but not in Obsidian, it’s an Obsidian refresh issue.
  • If the file is delayed in icloud.com, it’s an iCloud syncing problem.

Final Recommendation

  1. Try moving the file out of iCloud and back within the Shortcut.
  2. Use “Get File” action to trigger sync.
  3. Open Obsidian after running the Shortcut.

So try fooling around with it.
Also, what the bot says, check your iCloud settings in iOS.