SMARTBLOCKS:_MAKE_YOUR_OWN_WORKFLOWS

{{[[embed]]: ((3VJxxNhEu))}}

Overview

With a little practice you can learn quickly to turn just about anything in Roam into a workflow. A SmartBlock workflow follows a number of simple rules.

Structure of a SmartBlocks:

A parent block on any page that has the tag #42SmartBlock

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)

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