Capturing to a node by projectile title

Hi there,
I’m looking to make some templates that I will use for capturing tasks and notes for a certain project. with org-capture, I can use something like this (from doomemacs):

          ("o" "Centralized templates for projects")
          ("ot" "Project todo" entry
           (function +org-capture-central-project-todo-file)
           "* TODO %?\n %i\n %a"
           :heading "Tasks"
           :prepend nil)
          ("on" "Project notes" entry
           (function +org-capture-central-project-notes-file)
           "* %U %?\n %i\n %a"
           :heading "Notes"
           :prepend t)
          ("oc" "Project changelog" entry
           (function +org-capture-central-project-changelog-file)
           "* %U %?\n %i\n %a"
           :heading "Changelog"
           :prepend t)

Template itself is another topic, but I’m interested in an alternative for functions such:

  • org-capture-central-project-todo-file
  • org-capture-central-project-notes-file
  • org-capture-central-project-changelog-file

I would love to use them to find a node in org-roam by projectile title, and capture to a certain heading like “Tasks”, “Notes”, “Changelog”. Of course there can be collisions, so I think to have some interactive warning if this happens.

What would be the easiest way to do so?

I think you can achieve this by %(sexp). I suggest you refer to an example in this post.

I think this second part is something you can do with setting the type to entry (instead of the default plain) and… probably with a targe that includes olp. There are many posts about it on this forum ans elsewhere, but I think this might be useful.