# Org-roam custom capture template

**URL:** <https://org-roam.discourse.group/t/org-roam-custom-capture-template/2536>\
**Category:** Requests\
**Created:** [March 27, 2022, 4:53am UTC](https://org-roam.discourse.group/t/org-roam-custom-capture-template/2536 "2022-03-27T04:53:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvydas](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@arvydas](https://org-roam.discourse.group/u/arvydas)\
**Post date:** [March 27, 2022, 4:53am UTC](https://org-roam.discourse.group/t/org-roam-custom-capture-template/2536/1 "2022-03-27T04:53:44Z")

</div>

Currently my `org-capture-templates` look like this:

```auto
("I" "Inbox Timestamp" entry (file+headline "~/Dropbox/documents/org/roam/Inbox.org" "Inbox Timestamp") "* TODO %?\n%^{Effort}p\n%^{SCHEDULED}p")

```

This allows me to:

1. Set effort estimate on the task
2. Schedule date for the task
3. Add a tag for the task

Can I get the same features with `org-roam-capture-templates`?

This is how my current `org-roam` template looks like:

```auto
  (defun my/org-roam-capture-task ()
    (interactive)
    ;; Add the project file to the agenda after capture is finished
    (add-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)

    ;; Capture the new task, creating the project file if necessary
    (org-roam-capture- :node (org-roam-node-read
                              nil
                              (my/org-roam-filter-by-tag "project"))
                       :templates '(("p" "project" plain "** TODO %?"
                                     :if-new (file+head+olp "%<%Y%m%d%H%M%S>-${slug}.org"
                                                            "#+title: ${title}\n#+category: ${title}\n#+filetags: project"
                                                            ("Tasks"))))))

```

If I try to add those 3 features from `org-capture-template` to `org-roam-capture-template`, it looks something like this, right?

(only the :templates line was changed in the last code block)

```auto
  (defun my/org-roam-capture-task ()
    (interactive)
    ;; Add the project file to the agenda after capture is finished
    (add-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)

    ;; Capture the new task, creating the project file if necessary
    (org-roam-capture- :node (org-roam-node-read
                              nil
                              (my/org-roam-filter-by-tag "project"))
                       :templates '(("p" "project" plain "** TODO %?\n%^{Effort}p\n%^{SCHEDULED}p"
                                     :if-new (file+head+olp "%<%Y%m%d%H%M%S>-${slug}.org"
                                                            "#+title: ${title}\n#+category: ${title}\n#+filetags: project"
                                                            ("Tasks"))))))

```

But when I invoke that function, I get “Wrong type argument: stringp, nil” error.

Am I doing something wrong?

Is it possible to add scheduled time as well as tags and effort estimates on org-roam templated tasks?
