Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions apps/docs/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7059,6 +7059,29 @@ export function SimTriggerIcon(props: SVGProps<SVGSVGElement>) {
)
}

export function SimDeploymentsIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
{...props}
viewBox='0 0 222 222'
fill='none'
xmlns='http://www.w3.org/2000/svg'
aria-hidden='true'
>
<path
fillRule='evenodd'
clipRule='evenodd'
d='M107.822 93.76C107.822 97.35 106.403 100.792 103.884 103.328L103.523 103.692C101.006 106.236 97.59 107.658 94.02 107.658H13.45C6.02 107.658 0 113.718 0 121.191V208.332C0 215.806 6.02 221.866 13.45 221.866H99.96C107.383 221.866 113.4 215.806 113.4 208.332V126.745C113.4 123.419 114.71 120.228 117.047 117.874C119.377 115.527 122.546 114.207 125.849 114.207H207.777C215.198 114.207 221.214 108.148 221.214 100.674V13.53C221.214 6.06 215.198 0 207.777 0H121.26C113.839 0 107.822 6.06 107.822 13.53V93.76ZM134.078 18.55H194.952C199.289 18.55 202.796 22.09 202.796 26.45V87.76C202.796 92.12 199.289 95.66 194.952 95.66H134.078C129.748 95.66 126.233 92.12 126.233 87.76V26.45C126.233 22.09 129.748 18.55 134.078 18.55Z'
fill='#33C482'
/>
<path
d='M207.878 129.57H143.554C135.756 129.57 129.434 135.937 129.434 143.791V207.784C129.434 215.638 135.756 222.005 143.554 222.005H207.878C215.677 222.005 221.999 215.638 221.999 207.784V143.791C221.999 135.937 215.677 129.57 207.878 129.57Z'
fill='#33C482'
/>
</svg>
)
}

export function SimilarwebIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"cancelExecution",
"listWorkflows",
"getWorkflow",
"deployWorkflow",
"undeployWorkflow",
"rollbackWorkflow",
"getJobStatus"
]
}
123 changes: 123 additions & 0 deletions apps/docs/content/docs/en/integrations/deployments.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
title: Deployments
description: Manage workflow deployments
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard
type="deployments"
color="#0C0C0C"
/>

## Usage Instructions

Deploy, undeploy, and roll back workflows in the current workspace. Promote a previous deployment version to live, list every version, or fetch the deployed workflow state for a specific version.



## Actions

### `deployments_deploy`

Deploy a workflow’s current draft state, creating a new deployment version and making it live for API execution. Requires admin permission on the workflow’s workspace.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `workflowId` | string | Yes | ID of the workflow to deploy |
| `name` | string | No | Optional label for the new deployment version |
| `description` | string | No | Optional summary of what changed in this version |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `workflowId` | string | ID of the deployed workflow |
| `isDeployed` | boolean | Whether the workflow is now deployed |
| `deployedAt` | string | ISO 8601 timestamp of the deployment \(null if unavailable\) |
| `version` | number | The deployment version that is now active |
| `warnings` | array | Non-fatal warnings \(e.g. trigger or schedule sync still in progress\) |

### `deployments_undeploy`

Take a deployed workflow offline. API execution stops and schedules, webhooks, and other deployment side effects are removed. Requires admin permission on the workflow’s workspace.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `workflowId` | string | Yes | ID of the workflow to undeploy |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `workflowId` | string | ID of the undeployed workflow |
| `isDeployed` | boolean | Whether the workflow is still deployed \(false\) |
| `deployedAt` | string | Always null after an undeploy |
| `warnings` | array | Non-fatal warnings \(e.g. trigger or schedule cleanup still in progress\) |

### `deployments_promote`

Make a specific deployment version the live one without creating a new version — the same operation as Promote to live in the deploy modal. Useful for rolling back to a known-good version. Also works on an undeployed workflow: it re-deploys the workflow live at that version. Requires admin permission on the workflow’s workspace.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `workflowId` | string | Yes | ID of the workflow |
| `version` | number | Yes | The deployment version number to promote to live |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `workflowId` | string | ID of the workflow |
| `isDeployed` | boolean | Whether the workflow is now deployed |
| `deployedAt` | string | ISO 8601 timestamp of the active deployment \(null if unavailable\) |
| `version` | number | The deployment version that is now live |
| `warnings` | array | Non-fatal warnings \(e.g. trigger or schedule sync still in progress\) |

### `deployments_list_versions`

List every deployment version of a workflow, newest first, including which version is currently live.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `workflowId` | string | Yes | ID of the workflow |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `workflowId` | string | ID of the workflow |
| `versions` | array | Deployment versions, newest first \(id, version, name, description, isActive, createdAt, createdBy, deployedByName\) |

### `deployments_get_version`

Fetch a single deployment version of a workflow, including its metadata and the full workflow state snapshot that was deployed.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `workflowId` | string | Yes | ID of the workflow |
| `version` | number | Yes | The deployment version number to fetch |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `workflowId` | string | ID of the workflow |
| `version` | number | The deployment version number |
| `name` | string | Version label |
| `description` | string | Version description |
| `isActive` | boolean | Whether this version is currently live |
| `createdAt` | string | When this version was deployed \(ISO 8601\) |
| `deployedState` | json | The full workflow state snapshot \(blocks, edges, loops, parallels, variables\) |


1 change: 1 addition & 0 deletions apps/docs/content/docs/en/integrations/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"databricks",
"datadog",
"daytona",
"deployments",
"devin",
"discord",
"docusign",
Expand Down
28 changes: 25 additions & 3 deletions apps/docs/content/docs/en/workflows/deployment/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,28 @@ Every time you deploy or update, a new version is recorded in the Versions table

**Promote to live** is useful for rolling back — if a new deployment has an issue, promote the previous version to restore the last known-good state instantly.

## Managing Deployments via the API

Everything above can also be done programmatically. The v1 API exposes deploy, undeploy, and rollback endpoints — useful for CI/CD pipelines that ship a workflow after tests pass, or for reverting to the last known-good version from an incident script. All three require an API key with admin permission on the workflow's workspace.

```bash
# Deploy the current draft as a new version (body is optional)
curl -X POST https://sim.ai/api/v1/workflows/{workflow-id}/deploy \
-H "Content-Type: application/json" \
-H "x-api-key: $SIM_API_KEY" \
-d '{ "name": "Release 4", "description": "Fixes the agent prompt" }'

# Undeploy — take the workflow offline
curl -X DELETE https://sim.ai/api/v1/workflows/{workflow-id}/deploy \
-H "x-api-key: $SIM_API_KEY"

# Roll back to the previous version (or pass { "version": N } for a specific one)
curl -X POST https://sim.ai/api/v1/workflows/{workflow-id}/rollback \
-H "x-api-key: $SIM_API_KEY"
```

Rollback re-activates an existing deployment version — the same operation as **Promote to live** — and leaves your canvas draft untouched. See the API reference for full request and response details: [Deploy Workflow](/api-reference/workflows/deployWorkflow), [Undeploy Workflow](/api-reference/workflows/undeployWorkflow), and [Rollback Workflow](/api-reference/workflows/rollbackWorkflow).

## Making API Calls

Switch to the **API** tab in the Deploy modal to see ready-to-use code for all three execution modes:
Expand Down Expand Up @@ -226,8 +248,8 @@ Workflow execution responses are capped by platform request and response limits.
"id": "lv_abc123DEF456",
"kind": "array",
"size": 12582912,
"key": "execution/workspace-id/workflow-id/exec_xyz/large-value-lv_abc123DEF456.json",
"executionId": "exec_xyz",
"key": "execution/workspace-id/workflow-id/c7a92e15-3f4b-4d8c-a1e6-9b0d5f2c8e74/large-value-lv_abc123DEF456.json",
"executionId": "c7a92e15-3f4b-4d8c-a1e6-9b0d5f2c8e74",
"preview": { "length": 25000 }
}
```
Expand All @@ -254,7 +276,7 @@ curl -X POST https://sim.ai/api/workflows/{workflow-id}/execute \
"success": true,
"async": true,
"jobId": "run_abc123",
"executionId": "exec_xyz",
"executionId": "c7a92e15-3f4b-4d8c-a1e6-9b0d5f2c8e74",
"message": "Workflow execution queued",
"statusUrl": "https://sim.ai/api/jobs/run_abc123"
}
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/content/docs/en/workflows/triggers/sim.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Pick one event per Sim trigger block:
<li><strong>Execution Error</strong>: a watched workflow's run failed</li>
<li><strong>Execution Success</strong>: a watched workflow's run completed successfully</li>
<li><strong>Workflow Deployed</strong>: a watched workflow was deployed (including redeploys and version rollbacks)</li>
<li><strong>Workflow Undeployed</strong>: a watched workflow was taken offline</li>
</ul>

**Alert conditions** — evaluated as runs complete (failure-based conditions evaluate on failed runs), with a cooldown so they fire at most once per cooldown window:
Expand Down Expand Up @@ -60,6 +61,7 @@ All events include `event`, `timestamp`, `workflowId`, and `workflowName` (the s
<ul className="list-disc space-y-1 pl-6">
<li><strong>version</strong>: the deployment version number that was activated</li>
</ul>
<p>Workflow Undeployed carries only the base fields.</p>
</Tab>
</Tabs>

Expand Down
Loading
Loading