Read and edit a Worker's plan — the chart of steps Ysra drafts (When, Read, Do, Decide, Act, Deliver) and each run lights up.

On this page

A worker’s plan is a chart of the steps it goes through: what starts it, what it reads, what it does and decides, what it acts on, and what comes out. Ysra drafts the plan; you change it and save it. On every run, the worker goes through the steps in order and decides how to do each one itself. At a Decide step it answers the question and follows the matching path.

The chart is the plan, not a program. It gives the worker no new permission: what a worker may read and do is set when it is started (see Start a worker from Ask). A step can ask for more approval, but never for less.

Where the plan is#

The plan is on the worker’s page, in the web app and the desktop app: open Workers and choose the worker. The chart is under Plan, between what the worker may do and its runs. It is saved on its own, with Save plan; Edit changes the rest of the worker (see Edit a worker).

Beside Save plan, the plan says which version it is (for example "Version 3"), or "Unsaved changes" while you edit.

The six kinds of step#

Step What it is for
When What starts it. A plan has exactly one, at the start.
Read A file, a link, a connection or a mention.
Do An instruction in plain words.
Decide A yes or no question, and two paths.
Act Send, post or change something.
Deliver What comes out, and where it goes.

The steps are laid out left to right, starting from When.

How a plan is drafted#

Ysra drafts a plan:

  • For a worker started from Ask. A worker started from its card in a conversation starts without a plan. Ysra drafts one from the worker’s own instructions when you ask.
  • For a worker made before plans existed. It has none either, and Ysra drafts one the same way.
  • On the step-by-step screen. A worker described on the older New worker screen gets a drafted plan on Plan it. See The step-by-step screen.

For a worker with no plan, Ysra drafts only when you ask. The page says "This Worker has no plan yet. A plan shows the steps it goes through, as a chart you can change." Press Draft a plan. If no plan can be drafted, the page says why and the button becomes Try again.

The draft is shown with "Drafted from what this Worker does. Change anything, then save it to make it the Worker’s plan." and marked "A draft, not saved yet". Nothing is saved until you press Save plan. To drop the draft, press Discard changes; the page goes back to Draft a plan.

If Ysra can’t draft a plan, the worker gets a plain three-step one: When, then Do the job (its instructions), then Report what was done.

Edit the plan#

Add a step#

Press Add a step and choose a kind. If a step is selected, the new one is placed after it and linked from it when that step has no path out yet. A plan has only one When step, so When isn’t offered once there is one.

Drag a step’s right edge to another step to connect them. A step has one path out, so a new link from it replaces the old one. Only a Decide step splits: it has two outputs, Yes and No, and each leads to its own step. Nothing can lead into When.

Set up a step#

Click a step to open its settings:

Step Settings
Every step Title (for Decide: The question), up to 120 characters
When Runs: Only when run by hand, Weekdays at 09:00, Every day at 09:00 or Every hour
Read From: A file, A link, A connection or A mention, then the File, Link, Connection or Mention
Do What to do
Decide How to tell
Act Action (Send an email, Draft an email or Post a message) and Before it acts: Asks first or On its own
Deliver To: who or where

Other steps have an In plain words box. Press Done to close the settings.

Changing Runs on the When step changes when the worker runs, once you save. Runs offers only these four choices; any other schedule comes from the words you started the worker with, or is set under Schedule on the web app’s Edit screen. See Schedules.

Select a step or a line and press Delete. In a step’s settings, Remove this step does the same. Removing a step removes its links too.

Save#

While you edit, the chart says "Unsaved changes" and offers Discard changes. Press Save plan. Every save makes a new version of the worker ("Plan saved as version 4"), and runs already started keep the plan they started with.

If the worker was changed somewhere else in the meantime, the save is refused instead of overwriting that change, and the plan says so. Make the change again on the latest version.

You can drag steps around to tidy the chart; their places are saved with it. An archived worker’s plan can’t be changed. Its page still shows the chart, read-only.

Asks first#

An Act step is set to Asks first unless you choose On its own. Asks first makes that action stop for your approval, even if the worker’s grants would let it run on its own.

It only ever tightens. On its own doesn’t loosen anything: sending mail and posting to Slack always ask you first, whatever the chart says. See Runs and approvals.

Steps that can’t run yet#

A step that needs something the worker hasn’t been given is marked on the chart with why, and the chart says so above it: "One step can’t run yet" (or "3 steps can’t run yet"). For example:

The step What the chart says
Read from a link "Reads the web: this Worker needs web access."
Read from a connection "Reads a connected source: add the connection to this Worker."
Act that drafts email "Drafts email: this Worker needs to be allowed to draft mail."
Act that sends email "Sends email: this Worker needs to be allowed to send mail."
Act that posts to Slack "Posts to Slack: this Worker needs to be allowed to post."
Act that posts a message "Posts messages: this Worker needs to be allowed to post."

A run skips such a step and says why. Change the step or remove it; the mark goes once every step needs only what the worker has. If the worker really needs more, ask for it again in Ask with a job that says so, and start the new card. See Start a worker from Ask.

A plan that can’t be followed#

Before you save, the chart lists below it what would stop the plan from being saved, such as "The steps go round in a circle." or "“Read a source” can’t be reached from “When”."

If the plan still can’t be followed, saving is refused with one plain sentence, shown above the chart as it is. The sentences are:

  • "A chart starts with exactly one “When” step."
  • "Nothing can lead into the “When” step."
  • "A step can't link to itself."
  • "Two links join the same steps."
  • "A “Decide” step has one or two paths out."
  • "Both paths out of a “Decide” step need a label."
  • "Only a “Decide” step can split into two paths."
  • "The chart goes round in a circle."
  • "Not connected to the start: …", naming the steps that can’t be reached.

Change the chart and save again.

Follow a run on the chart#

Once a worker has run, Plan has two views: The plan and Latest run (This run while it is still going). The worker’s page opens on the run while it is still going, and on The plan otherwise.

The run view shows the saved chart, read-only, with the run’s state above it (for example Working or Done). It lights the chart up step by step, and keeps up as the run goes on. Select a step to see its kind and how far the run got with it. The legend under the chart says what each colour means:

Label Meaning
Done The worker finished this step.
Working now The worker is on this step.
Waiting for approval The step stops for your approval. See Runs and approvals.
Skipped The worker passed over it, for example the other path of a Decide step.
Not reached The run didn’t get to this step.

The lines the run took are highlighted. If a run didn’t mark its steps, the view says "this run didn’t report its steps".

On the phone, a worker’s page shows the chart read-only, with what the latest run did at each step.

YsraDocs