# Add time stamp to captures with roam-ref protocol

**URL:** <https://org-roam.discourse.group/t/add-time-stamp-to-captures-with-roam-ref-protocol/504>\
**Category:** Troubleshooting\
**Created:** [July 10, 2020, 7:56pm UTC](https://org-roam.discourse.group/t/add-time-stamp-to-captures-with-roam-ref-protocol/504 "2020-07-10T19:56:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fleimgruber](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@fleimgruber](https://org-roam.discourse.group/u/fleimgruber)\
**Post date:** [July 10, 2020, 7:56pm UTC](https://org-roam.discourse.group/t/add-time-stamp-to-captures-with-roam-ref-protocol/504/1 "2020-07-10T19:56:16Z")

</div>

Using the roam-ref protocol, how do I need to change `org-roam-capture-ref-templates` to include an org-mode(?) time stamp such as `#+created: [2020-07-10 Fri 21:55]`?

---

<div class="post-metadata">

**Author:** ![zaeph](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/zaeph/32/764_2.png) [@zaeph](https://org-roam.discourse.group/u/zaeph)\
**Post date:** [July 10, 2020, 8:08pm UTC](https://org-roam.discourse.group/t/add-time-stamp-to-captures-with-roam-ref-protocol/504/2 "2020-07-10T20:08:15Z")

</div>

You’d need to modify `org-roam-capture-ref-templates`. Here’s an example of what you could add to your config:

```auto
(setq org-roam-capture-ref-templates
      '(("r" "ref" plain
         #'org-roam-capture--get-point
         ""
         :file-name "caps/${slug}"
         :head "#+title: ${title}\n#+roam_key: ${ref}\n#+created: %u\n\n"
         :unnarrowed t)))

```

---

<div class="post-metadata">

**Author:** ![fleimgruber](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@fleimgruber](https://org-roam.discourse.group/u/fleimgruber)\
**Post date:** [July 10, 2020, 8:33pm UTC](https://org-roam.discourse.group/t/add-time-stamp-to-captures-with-roam-ref-protocol/504/3 "2020-07-10T20:33:10Z")

</div>

Thanks for checking back that quickly! That did it and in the end I used the `%T` escape.
