Skip to main content

Your first workflow

This tutorial walks you through the workflow editor, explains how to run workflows in the UI, and guides you in creating a sample workflow with event and target nodes.

The result of this tutorial is the 'Basic' example workflow that is pre-installed in new Jotsu accounts.

Create a workflow

  • Sign in to my.jotsu.com
  • Click the Workflows tab in the left sidebar.
  • Click the Add link in the upper right hand corner.
  • Give the workflow a name and description. Leave the schedule empty.
  • Click the Add Workflow button.

When you finish creating a workflow, a toast message appears in the lower-right corner of the screen.

Access the editor and add an event

Clicking on the name of the workflow you just created opens the workflow editor.

The workflow is initially empty so the first step is to add an event. The event determines how this workflow runs.

Since this workflow will be run manually in the editor, start by dragging the General event onto the grid. If you don’t see it right away, expand the Events section to reveal the General event option.

The text of the General event changes to a play icon when the event is dropped onto the grid.

Clicking the icon runs the workflow but does do much other that show a toast message that it completed successfully.

You can see the two actions of the workflow run by clicking the debug button in the upper-right hand corner of the editor.

Add a target node

Target nodes serve as the results of a workflow. They return data back to the user, providing the workflow’s output in some form.

Expand 'Nodes' in the editor sidebar and drag 'Target' to the editor grid. Dropping the node automatically connects the node to the previous one, in this case, the event.

Run the workflow again and this time a dialog appears with the data that the event automatically adds when a workflow is run. The initial workflow data contains information about the user's location and timezone that tools often need. For instance, the weather example uses the latitude/longitude information to retrieve the user's forecast.

Display specific data

Target nodes show you the data at a particular point in the workflow run.

If you want to display only certain information—for example, the user’s city—you can do this with a JSONata Expression. JSONata is a lightweight query language for JSON data, used throughout Jotsu workflows. In simple cases, selecting a value is as easy as typing its name.

  • Under JSONata Expression, enter city.
  • Set the display type to Markdown, since the output will be plain text.
  • Click Save.
  • Run the workflow again.

The workflow will now display the current city.