Import notes and attachments from a watched folder

Allow the user to designate a folder. On startup, Obsidian imports all notes and attachments in that folder.

2 Likes

That is already sort of what the Obsidian folder is. If you put files there, they are “imported”.

For example, I use Drafts 4 app to send notes from my phone to Obsidian. Drafts sends the notes into the Obsidian folder, and they instantly appear in Obsidian. “on startup” You don’t even have to restart Obsidian. They just appear.

Yes, Obsidian will read files in any folder inside of your vault folder - no action needed.

Could you provide a more specific example of what you’re trying to do?

I was trying to add PNG files to an attachments folder. I had created an attachments folder in Obsidian, mirroring what I saw in the Help vault, and then updated the Attachment Folder Path setting. I found the corresponding folder on my desktop and copied some files into it. They didn’t appear in Obsidian initially or after a restart.

At any rate, is sounds like this is not a feature request. It might be a bug or it might be PEBKAC. I do some more work to figure out which and file a bug report if it is the former.

Explain what you expect by “appear in Obsidian”. It may be a bug or it may be different expectations.

Do you expect a Markdown note to be automatically added to your Vault containing a link to the new attachment?

Here is what should happen, and does happen for me, when I test:

  1. Add an attachment to your Obsidian folder, by adding it manually in your filesystem. Call it picture_of_a_tiger.jpg
  2. In your File Explorer pane in Obsidian, the new file will be listed already.
  3. In a note, type ![[ to begin linking to an image. Type “tiger”. You should already see picture_of_a_tiger.jpg show up in the auto-complete suggestion.

If they are not appearing in your File Explorer pane, and not becoming available via auto-complete, then yes, perhaps you are experiencing a bug.

Can do, thanks for asking. I don’t have the app’s terminology down pat yet so I added a screenshot.

Expected:

  1. Put the file hello_world.png in /Path/To/Obsidian Help/Attachments
  2. In Obsidian, in the left-hand panel under attachments, see hello_world listed with the PNG filetype indicator.

Is that what I should expect?

Yes that is what you should expect. It should show up there.

  1. Did you test on your own vault?
  2. If you alter a note in Obsidian Help, do you see the corresponding Markdown file be updated in your file system? (ie. are you certain you are looking at the same vault, in the correct location?)

I assume you have tested on your own vault and are just using the help vault as an illustration? I just wonder if maybe you have 2 auto-generated help vaults? (That’s just a shot in the dark.)

(Sorry to ask simplistic questions. Just trying to get to the bottom of it.)

Oh and what OS are you on?

Two additional points:

  • Attachments don’t need to be in the designated “attachments folder” for Obsidian to recognize them. The “attachments folder” is only where new attachments are saved when they are pasted into Obsidian.
  • The help vault is special, and I don’t believe Obsidian is watching file changes in it. You should test in your own vault outside of the app directory.
1 Like

This might be the issue: I do not recall whether I tested this on my own vault or not. Will do so shortly.

Edit: BINGO. Clearly I neglected to try moving files into my own vault, because it works perfectly there. Thank you to you both for your help. Let me underline that: It would have been perfectly reasonable for you to write this off as the user error it proved to be. It was kind of you to persist, and to do so in a way that made sure I better understood how Obsidian works. Thank you.

1 Like

@CKHarwood Hey, glad you got it figured out! We’ve all been there figuring out how Obsidian works. Don’t hesitate to ask another question here or in the Discord community.