diff --git a/apps/docs/content/docs/en/platform/enterprise/custom-blocks.mdx b/apps/docs/content/docs/en/platform/enterprise/custom-blocks.mdx new file mode 100644 index 00000000000..57fe1bc6ce4 --- /dev/null +++ b/apps/docs/content/docs/en/platform/enterprise/custom-blocks.mdx @@ -0,0 +1,136 @@ +--- +title: Custom Blocks +description: Publish a deployed workflow as a reusable block for your organization +--- + +import { FAQ } from '@/components/ui/faq' +import { Image } from '@/components/ui/image' + +Custom blocks let you package a deployed workflow as a reusable block for your whole organization. Once published, the block appears in the workflow editor's block toolbar alongside built-in blocks like Agent and Function. Anyone in your organization can drop it into a workflow, fill in its inputs, and use its outputs — without needing access to the workflow behind it. + +A custom block always runs the **latest deployed version** of its source workflow, so improving the block is as simple as redeploying that workflow. + +--- + +## Common uses + +Custom blocks turn a workflow one team owns into infrastructure the whole organization can safely reuse. Credentials and complexity stay with the block's author; everyone else gets a clean block that's always up to date. A few patterns: + +- **Internal API gateway.** Wrap an authenticated internal or partner endpoint — "Create Ticket", "Charge Account", "Provision User" — behind a block that takes only the business inputs. Teammates call it without the base URL, API key, or auth headers, and when the endpoint changes you update one workflow instead of every consumer's. +- **Blessed knowledge lookup.** Package a vetted retrieval pipeline — chunking, filters, reranking — as "Search Company Docs" with a single query input, so teams reuse the approved retrieval instead of each rebuilding it. +- **Governed LLM step.** Share a prompt, model, and guardrail combination like "Summarize (house style)". You control the model and prompt org-wide; changing them is a redeploy, not a hunt through everyone's workflows. +- **Data enrichment.** Expose "Enrich Company" or "Lookup Customer by Email" that hides the provider keys and returns clean fields. +- **Compliance gate.** Offer "Redact PII" or "Policy Check" as a standardized step teams drop into their flows, with the rules maintained in one place. + +--- + +## Before you start + +- **Deploy the workflow first.** Only deployed workflows can be published as a block. If the workflow isn't deployed, deploy it, then come back. +- **Be a workspace admin.** Publishing and managing custom blocks requires workspace admin access. + +--- + +## Publishing a block + +### 1. Open Custom blocks settings + +Go to **Settings → Enterprise → Custom blocks** and click **Create block**. + +Custom blocks settings page listing a published block with its icon, name, and description, with a Create block button in the header + + +### 2. Choose the source workflow + +| Field | Description | +|-------|-------------| +| **Workspace** | The workspace that holds the workflow you want to publish. Only workspaces in your organization are listed. | +| **Workflow** | The workflow to publish. Only deployed workflows appear. If a workflow isn't deployed, deploy it first, then return here. | + +The block runs the source workflow's latest deployment. You publish one block per workflow, and the source workflow can't be changed later — to point at a different workflow, delete the block and publish a new one. + +### 3. Name and describe the block + +| Field | Description | +|-------|-------------| +| **Icon** | Optional. A square image (PNG, JPEG, SVG, or WebP) shown on the block. Falls back to your organization's logo, then a default glyph. | +| **Name** | The block's display name in the toolbar (e.g. `Invoice Parser`). Max 60 characters. | +| **Description** | A short summary of what the block does. Max 280 characters. | + +### 4. Configure inputs + +Every input on the source workflow's **Start** block is exposed as a field on the custom block. You don't choose which inputs to include — they all carry over, along with each input's name, type, and description. + +For each input you can add an optional **placeholder** (max 200 characters) — the hint text shown in the empty field to tell consumers what to enter. + +Because inputs are read live from the deployed workflow, renaming or adding a Start input and redeploying updates the block's fields automatically. + +### 5. Choose outputs + +Pick which of the workflow's outputs consumers can use, and give each one a name. Outputs are grouped by the block they come from, so you can expose exactly the values that matter and hide everything internal. + +- **At least one output is required.** +- Each exposed output needs a unique **name** (max 60 characters) — that's the name consumers reference in their workflows. + +Create block form filled in: Workspace and Workflow selectors, an uploaded icon, Name and Description fields, an expanded input with a placeholder, and two selected outputs each given a name + +### 6. Save + +Click **Save changes**. The block is published immediately and becomes available to everyone in your organization in the workflow editor's block toolbar. + +--- + +## Using a custom block + +In the workflow editor, open the block toolbar. Published custom blocks appear under a **Custom blocks** section. Drag one onto the canvas like any other block, fill in its inputs (using the placeholders as a guide), and reference its outputs in downstream blocks. + +Workflow editor block toolbar with a Custom Blocks section listing two published blocks below Core Blocks + +Consumers don't need any access to the source workflow. The block runs on its own, using only the inputs provided, and returns only the outputs you exposed. Internal steps, models, and intermediate values of the source workflow are never visible. + +A custom block connected to a Start block on the workflow canvas, with its query input filled in and the run output showing the returned fields + +--- + +## Managing blocks + +Open a block from **Settings → Enterprise → Custom blocks** to edit or delete it. + +- **Editing** changes only the block's presentation and interface — name, description, icon, input placeholders, and exposed outputs. The source workflow can't be re-pointed. +- **Changing what the block does** is done by editing and **redeploying the source workflow**. The block picks up the new deployment automatically; there's nothing to republish. +- **Deleting** a block is permanent. Workflows already using it will have that block removed, so replace it before deleting if it's in active use. + +--- + +## Good to know + +- **Always current.** A custom block runs the source workflow's latest deployment. There are no versions to pin or manage. +- **Access control.** Custom blocks appear in [Access Control](/platform/enterprise/access-control) alongside built-in blocks, so you can allowlist or restrict them per permission group. +- **Disabled blocks.** A disabled block can't be added to new workflows, but existing placements keep working. +- **Removed blocks.** Deleting a block (or deleting its source workflow) removes it from workflows that used it. +- **Not deployed.** If the source workflow is undeployed, the block shows a clear error when run. Redeploy the workflow to fix it. + +--- + + diff --git a/apps/docs/content/docs/en/platform/enterprise/meta.json b/apps/docs/content/docs/en/platform/enterprise/meta.json index 8ac0662175e..c80f99a22d3 100644 --- a/apps/docs/content/docs/en/platform/enterprise/meta.json +++ b/apps/docs/content/docs/en/platform/enterprise/meta.json @@ -4,6 +4,7 @@ "index", "sso", "access-control", + "custom-blocks", "whitelabeling", "audit-logs", "data-retention", diff --git a/apps/docs/public/static/enterprise/custom-blocks-canvas.png b/apps/docs/public/static/enterprise/custom-blocks-canvas.png new file mode 100644 index 00000000000..e952b15bb1b Binary files /dev/null and b/apps/docs/public/static/enterprise/custom-blocks-canvas.png differ diff --git a/apps/docs/public/static/enterprise/custom-blocks-form.png b/apps/docs/public/static/enterprise/custom-blocks-form.png new file mode 100644 index 00000000000..ed68e0e9ce5 Binary files /dev/null and b/apps/docs/public/static/enterprise/custom-blocks-form.png differ diff --git a/apps/docs/public/static/enterprise/custom-blocks-list.png b/apps/docs/public/static/enterprise/custom-blocks-list.png new file mode 100644 index 00000000000..18671499275 Binary files /dev/null and b/apps/docs/public/static/enterprise/custom-blocks-list.png differ diff --git a/apps/docs/public/static/enterprise/custom-blocks-toolbar.png b/apps/docs/public/static/enterprise/custom-blocks-toolbar.png new file mode 100644 index 00000000000..cd8fc3b8d92 Binary files /dev/null and b/apps/docs/public/static/enterprise/custom-blocks-toolbar.png differ diff --git a/apps/sim/app/workspace/[workspaceId]/settings/navigation.ts b/apps/sim/app/workspace/[workspaceId]/settings/navigation.ts index 40481cb1373..375c531cdc6 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/navigation.ts +++ b/apps/sim/app/workspace/[workspaceId]/settings/navigation.ts @@ -275,6 +275,7 @@ export const allNavigationItems: NavigationItem[] = [ requiresHosted: true, requiresEnterprise: true, selfHostedOverride: isCustomBlocksEnabled, + docsLink: 'https://docs.sim.ai/platform/enterprise/custom-blocks', }, { id: 'admin',