Build complex business logic for your SaaS using SaasRock's simple and flexible workflow engine.
Hey there! With SaasRock Workflows in the fresh v0.9.2 release, tackling complex tasks just got a whole lot easier with no-code. Also, a new Starter edition has been released!
TLDR: Watch the demo.

Summarizing the v0.9.2 release:
Workflows Feature ๐: in all editions, plus open source.
New SaasRock Starter ๐ฑ Edition at $149 one-time (no updates)
Black Friday 2023 Deal (Nov 27th - Dec 3rd): Use the coupon BF2023 for -40%.
Why is this not v1.0 yet? Help Desk and Affiliates are the 2 missing features. But in order to build Help Desk, I needed to build a workflow engine first.
Blocks: Triggers and Actions.
Variables and Credentials: Global variables and encrypted credentials.
Executions: A single run of a Workflow.
Workflow Context: Inputs and Outputs within a workflow execution.
Choose between different modes for triggering a workflow:
Manual: Manually trigger a Workflow.
API ๐ชจ: Use the API to trigger a Workflow @ /api/workflows/run/$id.
Stream ๐: Get updates from a stream (chat-like).
Tenants/Accounts can also create and run their own Workflows ๐ชจ.
There are 4 workflows editions:
Open source: remix-workflows
SaasRock Starter ๐ฑ: $149 one-time + no updates
SaasRock Core ๐ชจ: $1,399/y + updates
SaasRock Enterprise ๐: $2,099/y + updates
See the full feature comparison in the following table.

Manual: By clicking a button
Row Event ๐: created, updated, deleted
IF: True and False paths
HTTP Request: Set method, URL, Body, and Headers
Log: Logs to system
Alert User: Sends alert to current user
Switch ๐ชจ: Default, case1, case2... etc, paths
Iterator ๐ชจ: For loop using a variable
Variable ๐ชจ: Set a context variable
Wait for Input ๐: Waits for user input (support in Manual, API, and streaming)
GPT Chat Completion ๐: Call OpenAI API
Row Get ๐: Create an entity row
Row Create ๐: Create an entity row
Row Update ๐: Update an entity row
Row Delete ๐: Delete an entity row
Plus, on the Enterprise Edition ๐, I'll work on (long-term):
Crons support (Sleep, Delayed until...)
Send Emails
Global workflows (create a workflow in the admin dashboard for all tenants)
Advanced Workflow Analytics (i.e. percentages paths in a funnel)
Variables
Sometimes it's useful to have a global state. For example, you may have multiple GPT blocks across many workflows, and if there's a new model released, you could create a variable {{$vars.gptModel}}.

Credentials
In the case of credentials ๐, the only difference between them is that they're encrypted before storing and decrypted before using it, click here to see the method.
A workflow execution will always have an output similar to this:
{
"$params": {},
"$session": {
"tenant": {},
"user": {},
},
"$vars": {},
...blocksOutputs
}Explanation:
$params: Every execution starts with a JSON input
$session.tenant: If the execution is on the admin side, it's null
$session.user: If the execution is not started manually by a user, it's null
$vars: Global variables are injected
Finally, each executed block will have a value with the block name. For example, the following output is from the "GPT Simulator" workflow template.
{
"$params": {},
"$session": { "tenant": null, "user": null },
"$vars": {
"gptModel": "gpt-3.5-turbo"
},
"waitForInput": {
"input": "Hi"
},
"if": {
"condition": false,
"expression": "{{waitForInput.input}} Equals bye"
},
"gpt": {
"result": "Hello! How can I assist you today?"
}
}Using Variables
Since the workflow context has everything you need from the workflow execution, you now can access values from previous blocks. Using the previous example:
{{gpt.result}} will be "Hello! How can I assist you today?"
{{$session.tenant}} will be an empty string
{{$credentials.OPENAI_API_KEY}} will decrypt the value on the fly and destroy it
This is possible thanks to Handlebars.js.
I created a few templates that use every supported block, some of them are Core and/or Enteprise-only.

Input Examples
While building and testing your workflows, it's useful to set a few input examples instead of having to type the input body every time. For example:
Existing item: The input is { id: 10 }, so you know the workflow must go through the success path
ID parameter not provided: This tests that the initial execution (manually, via the API or in streaming mode) is sent correctly.
And so on.
The Manual Trigger has a special "validation" field that receives a JSON configuration. This validates the schema using Ajv JSON schema validator:
{
"type": "object",
"properties": {
"id": {
"type": "number"
}
},
"required": [
"id"
]
}You can create any necessary validation schema to ensure the correct execution of a workflow.
Finally, analyze workflow execution results:

I hope you're as excited as I am for workflows!
Let me know what you think on the Discord server or subscribe to my newsletter to get notified on new saasrock features.