Importing a file into v2

I am using org-roam v2. I have an org file that I used to take notes. I want to import it into my notes file. How do I do that? I tried just moving it into the directory, but when I do org-roam-node-find, it doesn’t identify the file… or the notes. I tried to find something about importing in the manual to no avail. Anyone know how to do this? And also maybe how to think about it conceptually?

I think I may have achieved what I wanted to do, although I’m not sure it’s the right approach. I just used org-id-store-link to set an id on the title headline. So it now looks like:

:ID:       2DF570F5-04F5-4737-B4CA-61B4842A659F
#+TITLE: Coffee Notes

Then I ran org-roam-db-sync and then when I did org-roam-node-fine, I could search Coffee Notes.

Is this the right method? One thing that confuses me is that the file name renames unchanged. It has no timestamp or anything like that, but maybe that is not important?

File names are not important for v2. Only the ID is used. So I believe your approach is fine.

That seems perfectly good. You could also create a new note (C-c n f), choose an appropriate title, and then paste the contents of what you’re importing.

Where it gets interesting is if you’re importing a whole lot of files. In that case you’d want to automatically create an ID for each one. You’d have to make sure the ID is not one that’s already used elsewhere in your database. The most natural way to do that would be to read your org-roam.db file. But if you don’t want to figure out how to use, say, SQL, you could also simply scrape all the IDs using grep, and then use a simple Python program that defines (and updates as you add files to your db) a big set of hashes.

Last, run org-roam-db-sync from Emacs.