The Pull References gives user the ability to pull references to the page.


You could use the Copy Extension button below to individually install this extension. To install, just paste anywhere in your Roam graph and click "Yes, I Know What I'm Doing".

Manual Installation

If the extension doesn't work after using the copy extension button above, try installing manually using the instructions below.

First create a block with the text {{[[roam/js]]}} on any page in your Roam DB. Then, create a single child of this block type three back ticks. A code block should appear. Copy this code and paste it into the child code block in your graph:

var existing = document.getElementById("roamjs-pull-references");
if (!existing) {
  var extension = document.createElement("script");
  extension.src = "https://roamjs.com/pull-references.js";
  extension.id = "roamjs-pull-references";
  extension.async = true;
  extension.type = "text/javascript";

Finally, click "Yes, I Know What I'm Doing".


The script supports the following configuration attributes, to be added in the [[roam/js/pull-references]] page:

  • Format - (Optional) The format that each reference will use when added to the page. Use ${ref} to specify where you want the text to be replaced by the block reference.
  • Remove Tags - (Optional) Set to 'True' if you would like to remove the tags from the block references after pulling them to the page.
  • Add TODO - (Optional) Outputs each reference with a {{[[TODO]]}} prefix. Use this as an alternative to Format if you don't want another reference to TODO that doesn't actually map to a task.

Here's an example configuration from my personal DB:

Create a button by typing {{pull references}} into a page. Clicking the button adds all the linked references as references on the current page.

This extension is also integrated with Smart Blocks! If you have both this extension and Roam42 installed, there will be a <%PULLREFERENCES%> command available. The command will automatically pull the linked references and paste blocks before continuing with the rest of the workflow.

Moving TODOs

To enable this feature, add the phrase Move Todos to a block on the roam/js/pull-references page and refresh Roam. On any block with a TODO on a daily notes page, a rightward facing arrow icon will appear on hover. Clicking the icon will allow you to pick a date to "move" the TODO to. After moving, the new block will block alias the original block and the original block will block alias the new block.

The Move TODO Dialog also has the option to ARCHIVED the todo instead of DONE if you have the todont extension installed. You could archive by default, by adding a child to the Move Todos block above that says archived.



This extension is brought to you by RoamJS! If you are facing any issues reach out to support@roamjs.com or click on the chat button on the bottom right.

If you get value from using this extension, consider sponsoring RoamJS by clicking on the button below!

A special thanks to those who's contributions also helped make this extension possible:

Other Extensions