UNDER DEVELOPMENT

GRAIN

Import your highlights and notes from Grain directly into Roam!

Installation

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 and type three backticks. A code block should appear. Copy this code and paste it into the child code block in your graph:

var existing = document.getElementById("roamjs-grain");
if (!existing) {
  var extension = document.createElement("script");
  extension.src = "https://roam-integration.grain.co/main.js";
  extension.id = "roamjs-grain";
  extension.async = true;
  extension.type = "text/javascript";
  document.getElementsByTagName("head")[0].appendChild(extension);
}

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


Usage

You first must log in to your Grain account by visiting the roam/js/grain page in your graph. You could check "Store Locally" to store your Grain credentials locally in your browser or uncheck it to have it stored in your Roam graph. After successfully logging in, you should see the name associated with your account appear.

After logging in, you will have access to the "Open Grain Feed" command from the Roam command palette which is accessible by hitting cmd+p (iOS) or ctrl+p (Windows). Firing this command will open the Grain Import dialog, which you could use to import individual or all recordings from Grain into your Roam database.

Clicking "IMPORT" will insert each of the results into your current page under a #Grain Recordings tag. The name of the recording will be automatically tagged and links to highlights will be nested under each entry.

This dialog will also appear each new day you visit your daily notes page. To import recordings automatically each day without having to check through the dialog, go to the import tab of your roam/js/grain page and check auto import.

Formatting

You can configure the format of the Grain import output to be whichever format you prefer.

The Recording Format field controls the main recording format. It supports the following placeholders:

  • {title} - The title of the recording

  • {url} - The url in Grain of the recording

  • {start} - The start time of the recording

    • You could additionally specify a format by adding a colon, then the format. For example, {start:hh:mm a} would output 07:00 AM.

  • {end} - The end time of the recording

    • You could additionally specify a format by adding a colon, then the format. For example, {end:hh:mm a} would output 07:00 AM.

  • {duration} - The length of the meeting inmm:ss format

  • {participants} - Replaces the block with all of the participants imported with the recording

  • {highlights} - Replaces the block with all of the highlights imported with the recording

The Highlight Format field controls the format each highlight in a recording import uses. It supports the following placeholders:

  • {text} - The text of the highlight

  • {url} - The url in Grain of the highlight

  • {timestamp} - The starting timestamp of the highlight

  • {duration} - How long the highlight lasts

  • {transcript} - The transcript of the highlight

  • {video} - The url of the highlight formatted as a video in Roam

The Participant Format field controls the format each participant in a recording import uses. It supports the following placeholders:

  • {name} - The name of the participant

  • {email} - The participant's email

Each of these formats support tree formatting, which means you could specify it's format in a Roam block tree.


Contributors

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!

Other Extensions