Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
aeef2b7
v0.3.19: openai oss models, invite & search modal fixes
waleedlatif1 Aug 5, 2025
9f2ff7e
Merge pull request #883 from simstudioai/staging
icecrasher321 Aug 5, 2025
85cdca2
v0.3.21: gpt-5, copilot files, configurable rate limits, fix deployed…
waleedlatif1 Aug 7, 2025
aedf5e7
v0.3.22: handle files, trigger mode, email validation, tag dropdown t…
waleedlatif1 Aug 9, 2025
1c818b2
v0.3.23: multiplayer variables, api key fixes, kb improvements, trigg…
icecrasher321 Aug 12, 2025
8fccd5c
Merge pull request #948 from simstudioai/staging
icecrasher321 Aug 12, 2025
f7573fa
v0.3.24: api block fixes
waleedlatif1 Aug 13, 2025
4107948
Merge pull request #954 from simstudioai/staging
waleedlatif1 Aug 13, 2025
56ffb53
Merge pull request #964 from simstudioai/staging
icecrasher321 Aug 14, 2025
e1f04f4
v0.3.26: fix billing, bubble up workflow block errors, credentials se…
icecrasher321 Aug 14, 2025
6133db5
v0.3.27: oauth/webhook fixes, whitelabel fixes, code cleanups
icecrasher321 Aug 15, 2025
a0cf003
Merge pull request #986 from simstudioai/staging
icecrasher321 Aug 15, 2025
97b6bcc
v0.3.28: autolayout, export, copilot, kb ui improvements
waleedlatif1 Aug 16, 2025
570c07b
Merge pull request #1004 from simstudioai/staging
icecrasher321 Aug 18, 2025
af60ccd
fix: migration mem issues bypass
icecrasher321 Aug 18, 2025
3873f44
Merge pull request #1007 from simstudioai/staging
icecrasher321 Aug 18, 2025
5c56cbd
Merge pull request #1008 from simstudioai/staging
icecrasher321 Aug 18, 2025
60a9a25
Merge pull request #1009 from simstudioai/staging
icecrasher321 Aug 18, 2025
d75cc1e
v0.3.30: duplication, control bar fixes
waleedlatif1 Aug 18, 2025
1619d63
v0.3.31: webhook fixes, advanced mode parameter filtering, credential…
waleedlatif1 Aug 19, 2025
6b185be
v0.3.32: loop block max increase, url-encoded API calls, subflow logs…
waleedlatif1 Aug 20, 2025
5d74db5
v0.3.33: update copilot docs
icecrasher321 Aug 20, 2025
2c47cf4
v0.3.34: azure-openai options, billing fixes, mistral OCR via Azure, …
waleedlatif1 Aug 21, 2025
cd1bd95
fix(nextjs): downgrade nextjs due to known issue with bun commonjs mo…
waleedlatif1 Aug 21, 2025
abad362
fix(build): clear docker build cache to use correct Next.js version
waleedlatif1 Aug 21, 2025
e107363
v0.3.35: migrations, custom email address support
waleedlatif1 Aug 21, 2025
991f044
v0.3.36: workflow block logs, whitelabeling configurability, session …
waleedlatif1 Aug 22, 2025
4846f6c
v0.3.37: azure OCR api key, wand SSE, CRON helm
waleedlatif1 Aug 22, 2025
fdfa935
v0.3.38: billing cron job fix
icecrasher321 Aug 23, 2025
ed9b9ad
v0.3.39: billing fixes, custom tools fixes, copilot client-side migra…
waleedlatif1 Aug 24, 2025
fd6d927
v0.3.40: copilot improvements, knowledgebase improvements, security i…
waleedlatif1 Aug 29, 2025
8739a3d
fix(ssl): add envvar for optional ssl cert (#1179)
waleedlatif1 Aug 29, 2025
9213202
fix(db): accept self-signed certs (#1181)
waleedlatif1 Aug 29, 2025
921c755
v0.3.40: drizzle fixes, custom postgres port support
waleedlatif1 Aug 29, 2025
7ac89e3
revert(dep-changes): revert drizzle-orm version and change CI yaml sc…
icecrasher321 Aug 29, 2025
316c970
Merge pull request #1189 from simstudioai/staging
icecrasher321 Aug 29, 2025
76fac13
v0.3.41: wand with azure openai, generic mysql and postgres blocks
waleedlatif1 Aug 30, 2025
0bc7781
v0.3.42: kb config defaults, downgrade nextjs
waleedlatif1 Aug 30, 2025
ee17cf4
v0.3.43: added additional parsers, mysql block improvements, billing …
waleedlatif1 Aug 31, 2025
0cf87e6
v0.3.44: removing unused routes, whitelabeling terms & policy URLs, e…
waleedlatif1 Sep 3, 2025
581929b
v0.3.45: fixes for organization invites, custom tool execution
waleedlatif1 Sep 3, 2025
fce1423
v0.3.46: fix copilot stats updates
Sg312 Sep 3, 2025
60a061e
v0.3.47: race condition fixes, store rehydration consolidation, other…
waleedlatif1 Sep 5, 2025
bd6d4a9
0.3.48: revert trigger dev bypass for enterprise users
icecrasher321 Sep 5, 2025
a0bb754
0.3.49: readme updates, router block and variables improvements
waleedlatif1 Sep 5, 2025
d45324b
fix(sidebar): draggable cursor on sidebar when switching workflows (#…
waleedlatif1 Sep 7, 2025
784992f
v0.3.50: debounce moved server side, hasWorkflowChanged fixes, advanc…
icecrasher321 Sep 8, 2025
ea8762e
v0.3.51: mcp support, copilot improvements, polling for live executio…
waleedlatif1 Sep 10, 2025
1ad31c9
v0.3.52: docs updates, deployment version tables, workspace-level api…
icecrasher321 Sep 12, 2025
a06ae0d
v0.3.53: logs search, idempotency for webhooks, billing fixes for ove…
waleedlatif1 Sep 16, 2025
2149f5e
v0.3.54: google forms block, new landing page, generic mail tool, bil…
icecrasher321 Sep 17, 2025
2df6552
v0.3.55: landing page / OTP improvements, DB package separation, Webh…
waleedlatif1 Sep 18, 2025
bff1852
v0.3.56: i18n, sharepoint operations & logs search improvements
icecrasher321 Sep 18, 2025
c017027
v0.3.57: docs updates, generic webhook variables deconstruction, olla…
waleedlatif1 Sep 22, 2025
5c92d5d
v0.3.58: trigger.dev updates
waleedlatif1 Sep 22, 2025
52f1ceb
remove inline css for edge labels
icecrasher321 Sep 26, 2025
ef1888f
fix remote code execution imports for javascript
icecrasher321 Sep 26, 2025
707a926
Merge branch 'staging', remote-tracking branch 'origin' into improvem…
icecrasher321 Sep 26, 2025
76c1e98
add docs for new triggers
icecrasher321 Sep 26, 2025
39860bd
fix
icecrasher321 Sep 26, 2025
4246453
fix draggable link
icecrasher321 Sep 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/docs/content/docs/de/blocks/workflow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import { Image } from '@/components/ui/image'

Der Workflow-Block ermöglicht es, andere Workflows als wiederverwendbare Komponenten innerhalb deines aktuellen Workflows auszuführen. Dies ermöglicht modulares Design, Codewiederverwendung und die Erstellung komplexer verschachtelter Workflows, die aus kleineren, fokussierten Workflows zusammengesetzt werden können.

<div className="flex justify-center">
<div className="flex justify-center my-6">
<Image
src="/static/blocks/workflow.png"
alt="Workflow-Block"
width={500}
height={350}
className="my-6"
width={400}
height={280}
className="rounded-xl border border-border shadow-sm"
/>
</div>

Expand Down
175 changes: 23 additions & 152 deletions apps/docs/content/docs/en/blocks/workflow.mdx
Original file line number Diff line number Diff line change
@@ -1,169 +1,40 @@
---
title: Workflow
title: Workflow Block
description: Run another workflow inside the current flow
---

import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'

The Workflow block allows you to execute other workflows as reusable components within your current workflow. This enables modular design, code reuse, and the creation of complex nested workflows that can be composed from smaller, focused workflows.
## What It Does

<div className="flex justify-center">
<div className='flex justify-center my-6'>
<Image
src="/static/blocks/workflow.png"
alt="Workflow Block"
width={500}
height={350}
className="my-6"
src='/static/blocks/workflow.png'
alt='Workflow block configuration'
width={400}
height={280}
className='rounded-xl border border-border shadow-sm'
/>
</div>

<Callout type="info">
Workflow blocks enable modular design by allowing you to compose complex workflows from smaller, reusable components.
</Callout>

## Overview

The Workflow block serves as a bridge between workflows, enabling you to:

<Steps>
<Step>
<strong>Reuse existing workflows</strong>: Execute previously created workflows as components within new workflows
</Step>
<Step>
<strong>Create modular designs</strong>: Break down complex processes into smaller, manageable workflows
</Step>
<Step>
<strong>Maintain separation of concerns</strong>: Keep different business logic isolated in separate workflows
</Step>
<Step>
<strong>Enable team collaboration</strong>: Share and reuse workflows across different projects and team members
</Step>
</Steps>

## How It Works

The Workflow block:

1. Takes a reference to another workflow in your workspace
2. Passes input data from the current workflow to the child workflow (available via start.input)
3. Executes the child workflow in an isolated context
4. Returns the result back to the parent workflow for further processing
Drop a Workflow block when you want to call a child workflow as part of a larger flow. The block runs the latest deployed version of that workflow, waits for it to finish, and then continues with the parent.

## Configuration Options
## Configure It

### Workflow Selection
1. **Pick a workflow** from the dropdown (self-references are blocked to prevent loops).
2. **Map inputs**: If the child workflow has an Input Form trigger, you’ll see each field and can connect parent variables. The mapped values are what the child receives.
3. **Outputs**: After the child finishes, the block exposes:
- `result` – the child workflow’s final response
- `success` – whether it ran without errors
- `error` – message when the run fails

Choose which workflow to execute from a dropdown list of available workflows in your workspace. The list includes:
## Execution Notes

- All workflows you have access to in the current workspace
- Workflows shared with you by other team members
- Both enabled and disabled workflows (though only enabled workflows can be executed)
- Child workflows run in the same workspace context, so environment variables and tools carry over.
- The block uses deployment versioning: any API, schedule, webhook, manual, or chat execution calls the deployed snapshot. Redeploy the child when you change it.
- If the child fails, the block raises an error unless you handle it downstream.


### Execution Context

The child workflow executes with:

- Its own isolated execution context
- Access to the same workspace resources (API keys, environment variables)
- Proper workspace membership and permission checks
- Nested tracespan in the execution log

<Callout type="warning">
**Cycle Detection**: The system automatically detects and prevents circular dependencies between workflows to avoid infinite loops.
<Callout>
Keep child workflows focused. Small, reusable flows make it easier to combine them without creating deep nesting.
</Callout>

## Inputs and Outputs

<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Workflow Selection</strong>: Choose which workflow to execute
</li>
<li>
<strong>Input Data</strong>: Variable or block reference to pass to child workflow
</li>
<li>
<strong>Execution Context</strong>: Isolated environment with workspace resources
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>workflow.success</strong>: Boolean indicating completion status
</li>
<li>
<strong>workflow.childWorkflowName</strong>: Name of executed child workflow
</li>
<li>
<strong>workflow.result</strong>: Result returned by the child workflow
</li>
<li>
<strong>workflow.error</strong>: Error details if workflow failed
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Workflow Response</strong>: Primary output from child workflow
</li>
<li>
<strong>Execution Status</strong>: Success status and error information
</li>
<li>
<strong>Access</strong>: Available in blocks after the workflow
</li>
</ul>
</Tab>
</Tabs>

## Example Use Cases

### Modular Customer Onboarding

<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Break down complex onboarding into reusable components</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Main workflow receives customer data</li>
<li>Workflow block executes validation workflow</li>
<li>Workflow block executes account setup workflow</li>
<li>Workflow block executes welcome email workflow</li>
</ol>
</div>

### Microservice Architecture

<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Create independent service workflows</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Payment processing workflow handles transactions</li>
<li>Inventory management workflow updates stock</li>
<li>Notification workflow sends confirmations</li>
<li>Main workflow orchestrates all services</li>
</ol>
</div>

### Conditional Processing

<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Execute different workflows based on conditions</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Condition block evaluates user type</li>
<li>Enterprise users → Complex approval workflow</li>
<li>Standard users → Simple approval workflow</li>
<li>Free users → Basic processing workflow</li>
</ol>
</div>

## Best Practices

- **Keep workflows focused**: Design child workflows to handle specific, well-defined tasks with clear inputs and outputs
- **Minimize nesting depth**: Avoid deeply nested workflow hierarchies for better maintainability and performance
- **Handle errors gracefully**: Implement proper error handling for child workflow failures and provide fallback mechanisms
- **Test independently**: Ensure child workflows can be tested and validated independently from parent workflows
- **Use semantic naming**: Give workflows descriptive names that clearly indicate their purpose and functionality
17 changes: 17 additions & 0 deletions apps/docs/content/docs/en/execution/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Execution

import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Image } from '@/components/ui/image'

Sim's execution engine brings your workflows to life by processing blocks in the correct order, managing data flow, and handling errors gracefully, so you can understand exactly how workflows are executed in Sim.

Expand Down Expand Up @@ -88,6 +89,22 @@ Chat deployment creates a conversational interface for your workflow:

Each deployment method passes data to your workflow's starter block, beginning the execution flow.

## Deployment Snapshots

All public entry points—API, Chat, Schedule, Webhook, and Manual runs—execute the workflow’s active deployment snapshot. Publish a new deployment whenever you change the canvas so every trigger uses the updated version.

<div className='flex justify-center my-6'>
<Image
src='/static/execution/deployment-versions-light.png'
alt='Deployment versions table'
width={500}
height={280}
className='rounded-xl border border-border shadow-sm'
/>
</div>

The Deploy modal keeps a full version history—inspect any snapshot, compare it against your draft, and promote or roll back with one click when you need to restore a prior release.

## Programmatic Execution

Execute workflows from your applications using our official SDKs:
Expand Down
60 changes: 60 additions & 0 deletions apps/docs/content/docs/en/triggers/api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: API Trigger
description: Start a workflow from an authenticated HTTP request
---

import { Callout } from 'fumadocs-ui/components/callout'
import { Image } from '@/components/ui/image'

## Overview

The API trigger exposes your workflow as a secure HTTP endpoint. Send JSON data to the endpoint and your workflow processes it immediately. API calls always execute against your latest deployment.

## Configure Input Format

<div className='flex justify-center my-6'>
<Image
src='/static/triggers/api-trigger-light.png'
alt='API trigger input format'
width={400}
height={250}
className='rounded-xl border border-border shadow-sm'
/>
</div>

Add an **Input Format** field for each parameter. Runtime output keys mirror the schema and are also available under `<api.input>`.

```yaml
- type: string
name: userId
value: demo-user # optional manual test value
- type: number
name: maxTokens
```

Manual runs in the editor use the `value` column so you can test without sending a request. During execution the resolver populates both `<api.userId>` and `<api.input.userId>`.

## Request Example

```bash
curl -X POST \
https://sim.ai/api/workflows/WORKFLOW_ID/execute \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_KEY' \
-d '{"userId":"demo-user","maxTokens":1024}'
```

Successful responses return the serialized execution result from the Executor. Errors surface validation, auth, or workflow failures.

## Output Reference

| Reference | Description |
|-----------|-------------|
| `<api.field>` | Field defined in the Input Format |
| `<api.input>` | Entire structured request body |

If no Input Format is defined, the executor exposes the raw JSON at `<api.input>` only.

<Callout type="warning">
A workflow can contain only one API Trigger. Publish a new deployment after changes so the endpoint stays up to date.
</Callout>
43 changes: 43 additions & 0 deletions apps/docs/content/docs/en/triggers/chat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Chat Trigger
description: Start a workflow from a chat deployment
---

import { Callout } from 'fumadocs-ui/components/callout'
import { Image } from '@/components/ui/image'

## Overview

The Chat trigger creates a conversational interface for your workflow. Deploy your workflow as a chat and users can interact with it through a shareable URL. Each message starts a new workflow execution using your latest deployment.

## Runtime Outputs

<div className='flex justify-center my-6'>
<Image
src='/static/triggers/chat-trigger-light.png'
alt='Chat deployment conversation'
width={400}
height={250}
className='rounded-xl border border-border shadow-sm'
/>
</div>

The trigger writes three fields that downstream blocks can reference:

| Reference | Description |
|-----------|-------------|
| `<chat.input>` | Latest user message |
| `<chat.conversationId>` | Conversation thread ID |
| `<chat.files>` | Optional uploaded files |

Files include `name`, `mimeType`, and a signed download `url`.

## Usage Notes

1. Add one Chat Trigger block per workflow.
2. Deploy the workflow in chat mode.
3. Share the deployment link—every reply reuses the conversation ID so the workflow can keep context.

<Callout type="info">
The builder blocks multiple Chat Trigger blocks in the same workflow.
</Callout>
52 changes: 52 additions & 0 deletions apps/docs/content/docs/en/triggers/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Triggers
description: Core ways to start Sim workflows
---

import { Card, Cards } from 'fumadocs-ui/components/card'

## Core Triggers

Pick one trigger per workflow to define how it starts:

<Cards>
<Card title="API" href="/triggers/api">
HTTP endpoint that maps JSON bodies into workflow inputs
</Card>
<Card title="Chat" href="/triggers/chat">
Deployed chat interface with streaming responses
</Card>
<Card title="Input Form" href="/triggers/input-form">
Typed manual input used in editor runs and child workflows
</Card>
<Card title="Manual" href="/triggers/manual">
On-demand runs with no additional data
</Card>
<Card title="Schedule" href="/triggers/schedule">
Cron or interval based execution
</Card>
<Card title="Webhook" href="/triggers/webhook">
Receive external webhook payloads
</Card>
</Cards>

## Quick Comparison

| Trigger | Start condition |
|---------|-----------------|
| **API** | Authenticated HTTP POST |
| **Chat** | Chat deployment message |
| **Input Form** | On manual submit in editor or parent workflow |
| **Manual** | Run button in editor |
| **Schedule** | Timer managed in schedule modal |
| **Webhook** | On inbound HTTP request |

## Using Triggers

1. Drop the trigger block in the start slot.
2. Configure any required schema or auth.
3. Connect the block to the rest of the workflow.

> Deployments power every trigger. Update the workflow, redeploy, and all trigger entry points pick up the new snapshot. Learn more in [Execution → Deployment Snapshots](/execution).

Legacy Starter blocks remain for existing flows but no longer appear in new builds.
Loading