SMARTBLOCKS: MAKE YOUR OWN WORKFLOWS

Table of contents

Overview

You can quickly turn just about anything in Roam into a workflow. A SmartBlock workflow follows a number of simple rules outlined below. There is a Workflow SmartBlock to help you get started.

Structure of a SmartBlocks:

A parent block on any page that has the tag #42SmartBlock followed by the workflow title

all child blocks are the workflow

Example

Description:

  • #42SmartBlock Meeting Agenda (This is the parent block, it will not be inserted when the action is triggered)

    • Child block 1 (all text in this block will be inserted)

    • Child block 2 (this block of text will be inserted)

      • Indented Child block (this block will be inserted and indented)

Formatting

Any formatting will be included in the output of the workflow, such as ** for bold, _ for emphasizing and so on

Headers and alignment settings are also maintained

Special Commands

Workflows can be "Smart" which means you can embed certain commands, even JavaScript into your workflow to have it perform dynamic actions. See the section [[roam42/SmartBlocks: Understanding Commands]] for more information.

Example of SmartBlocks with commands

Description

  • #42SmartBlock Meeting Agenda (Parent block, followed by children blocks)

    • Date: <%DATE:today%> <%TIME%>

    • <%IFDAYOFWEEK:1%> Monday detailed briefing

Helper Workflow

SmartBlocks includes a workflow named Workflow Starter (SmartBlock function) Type jjworkflow

Helps you start a new workflow quickly by inserting a template as a starting point

Support

There is an active community at roamresearch.slack.com channels #roam42 and #roam-js. Stop by if you need help or want to share your ideas.