Rumatadocs
Browse documentation

Run your first workflow

Build a two-step workflow that takes a name and returns a greeting. Run it, inspect the output, and try a different input.

Step-by-step guidance.

Before you start

  • An open factory workspace. Create an application if you do not have one.
  • Permission to create and run workflows, with workflow allowance available.

What you’ll build

A Manual Trigger passes a name to a Code step. The Code step returns a greeting. This example does not write records, send messages, or require an external account.

StepJob
Manual TriggerStarts when you run it with sample input.
CodeReads the input and returns a new value.

A workflow is the saved set of steps. A run is one execution of those steps with particular input.

1. Create a workflow

  1. Open System Explorer → Workflows in your factory.
  2. Choose New workflow and name it “My first greeting”.
  3. A new workflow starts with an HTTP Trigger. Select it, set How it starts to Manually (run on demand), and change Step Name to Manual Trigger. Keep only this one trigger.

2. Add the transformation

  1. Use Add step to add Code. Select the Code step to open its settings.
  2. Paste the JavaScript below into the code editor.
  3. Connect the Manual Trigger’s out handle to the Code step’s in handle.
javascript
const name = String($.name ?? "friend").trim() || "friend";
return { greeting: `Hello, ${name}!` };

The $ value is the input received by this step. The return value is its output. For example, a name of “Sam” produces “Hello, Sam!”.

3. Save and run with sample input

  1. Review validation messages and choose Create to save the new workflow. For a workflow already created, use Save.
  2. Choose Run to open the test panel, then switch to JSON mode.
  3. Enter the JSON below in Trigger input (JSON), then choose Run workflow once.
json
{ "name": "Sam" }

If the editor reports missing configuration, use Review first item to open the step that needs attention. See test-run controls for the request panel.

4. Inspect the result

  1. In the result panel, expand the Code step under Nodes.
  2. Check that its input includes name: Sam and its output contains the greeting below.
  3. Open Runs to find this execution again. Opening a historical run does not rerun it.
json
{ "greeting": "Hello, Sam!" }
If you see…Check this
“Hello, friend!”Check the spelling of name in Trigger input (JSON) and the input received by Code.
A code errorUse the Code node’s JavaScript editor, and check that the complete snippet was pasted.
No Code outputCheck the connection, saved version, and first failed node.
Run is unavailable or rejectedCheck workflow permissions, validation messages, and remaining usage allowance.

5. Change the input

  1. Open Run again and change the name in Trigger input (JSON) to “Alex”.
  2. Choose Run workflow and confirm the Code output is “Hello, Alex!”.
  3. Run once more with an empty object, {}. The fallback result should be “Hello, friend!”.

Next: give the workflow a useful job

To start automatically, learn about HTTP and schedule triggers. To call another tool, follow Connect external services.

Add one step at a time and verify its result. When your workflow writes data or calls an external service, check the actual destination as well as the run status.