Hi everyone,

u/daviwil had released an excellent video in his System Crafters channel, where he showed how to hack org-roam:

https://systemcrafters.net/build-a-second-brain-in-emacs/5-org-roam-hacks/

I have copied his code into my config (the function that allows to create a TODO in a project file that we select (or create if not existing) is very useful.

I want to create a similar one: I want to create an event in a select customer file and to create this customer file if it does not exist.

The filter of the nodes with the tags “customer” works, but I am stuck with the definition of the content to insert as the event:

- I want the events to be inserted as subheadings of the heading “History” of the customer file (easy)

- I want the events to be saved as a tree structure:

** Year
*** Month
**** day
***** Event 1
***** Event 2....

I am trying to modify his code, but I always have errors

- I have replaced plain with entry in order to get the content as a heading

- I have replaced file+head+olp in the template definition by file+olp+datetree

 (org-roam-capture- :node (org-roam-node-read
                            nil
                            (my/org-roam-filter-by-tag "customer"))
  :templates '(("p" "project" entry "* %<%u>%?/n%i\n%a"
                                   :if-new (file+olp+datetree "%<%Y%m%d%H%M%S>-${slug}.org"
                                                          "#+title: ${title}\n#+category: ${title}\n#+filetags: project"
                                                          ("History"))))))

But still I get the error save-excursion: Wrong type argument: integer-or-marker-p, nil"

What do I get wrong??