Skip to content

Commit 13b5d21

Browse files
improvement(access-controls): docs, terminology, fix delete bug (#5141)
* improvement(access-controls): dedup independent block names * improvement(access-controls): fix delete button, naming in perm group modal
1 parent 91f9dfd commit 13b5d21

7 files changed

Lines changed: 46 additions & 40 deletions

File tree

apps/docs/content/docs/en/workflows/blocks/webhook.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: Webhook
3-
description: The Webhook block sends an HTTP POST to an external endpoint, with automatic headers and optional signing.
2+
title: Outgoing Webhook
3+
description: The Outgoing Webhook block sends an HTTP POST to an external endpoint, with automatic headers and optional signing.
44
pageType: reference
55
---
66

77
import { Callout } from 'fumadocs-ui/components/callout'
88
import { BlockPreview, WorkflowPreview, WEBHOOK_NOTIFY_WORKFLOW, WEBHOOK_TRIGGER_WORKFLOW } from '@/components/workflow-preview'
99
import { FAQ } from '@/components/ui/faq'
1010

11-
The Webhook block sends HTTP POST requests to external webhook endpoints with automatic webhook headers and optional HMAC signing.
11+
The Outgoing Webhook block sends HTTP POST requests to external webhook endpoints with automatic webhook headers and optional HMAC signing.
1212

1313
<BlockPreview type="webhook" />
1414

@@ -77,16 +77,16 @@ Format the result, then POST it to a Slack, Discord, or custom endpoint.
7777

7878
<WorkflowPreview workflow={WEBHOOK_TRIGGER_WORKFLOW} />
7979

80-
When the Condition passes, the Webhook starts a process in another system.
80+
When the Condition passes, the Outgoing Webhook starts a process in another system.
8181

8282
<Callout>
83-
The Webhook block always uses POST. For other HTTP methods or more control, use the [API block](/workflows/blocks/api).
83+
The Outgoing Webhook block always uses POST. For other HTTP methods or more control, use the [API block](/workflows/blocks/api).
8484
</Callout>
8585

8686
<FAQ items={[
87-
{ question: "Can I use HTTP methods other than POST?", answer: "No. The Webhook block always sends POST requests. If you need GET, PUT, DELETE, or PATCH, use the API block instead, which supports all standard HTTP methods." },
87+
{ question: "Can I use HTTP methods other than POST?", answer: "No. The Outgoing Webhook block always sends POST requests. If you need GET, PUT, DELETE, or PATCH, use the API block instead, which supports all standard HTTP methods." },
8888
{ question: "How does HMAC payload signing work?", answer: "When you provide a signing secret, the block generates an HMAC-SHA256 signature of the payload and includes it in the X-Webhook-Signature header in the format t=timestamp,v1=signature. The receiver can verify by computing HMAC-SHA256(secret, \"timestamp.body\") and comparing with the v1 value." },
8989
{ question: "What headers are added automatically?", answer: "Every webhook request automatically includes Content-Type (application/json), X-Webhook-Timestamp (Unix timestamp in milliseconds), X-Delivery-ID (unique UUID), and Idempotency-Key (same as X-Delivery-ID for deduplication)." },
9090
{ question: "Can custom headers override the automatic ones?", answer: "Yes. Any custom headers you define in the Additional Headers section will override automatic headers that share the same name." },
91-
{ question: "How is the Webhook block different from the API block?", answer: "The Webhook block is purpose-built for webhook delivery: it is POST-only, automatically adds webhook-specific headers (timestamp, delivery ID, idempotency key), and supports optional HMAC signing. The API block is more general-purpose with support for all HTTP methods, query parameters, and configurable retries." },
91+
{ question: "How is the Outgoing Webhook block different from the API block?", answer: "The Outgoing Webhook block is purpose-built for webhook delivery: it is POST-only, automatically adds webhook-specific headers (timestamp, delivery ID, idempotency key), and supports optional HMAC signing. The API block is more general-purpose with support for all HTTP methods, query parameters, and configurable retries." },
9292
]} />

apps/docs/content/docs/en/workflows/triggers/sim.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Sim
2+
title: Sim Workspace Events
33
---
44

55
import { Callout } from 'fumadocs-ui/components/callout'
66
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
77
import { FAQ } from '@/components/ui/faq'
88

9-
The Sim trigger runs a workflow when events happen in your workspace: another workflow's run fails or succeeds, a workflow is deployed, or an alert condition like a latency spike or cost threshold is met. Use it to build side-effect workflows — alerting, escalation, auto-remediation — composed from any blocks (Slack, email, webhooks, custom logic).
9+
The Sim Workspace Events trigger runs a workflow when events happen in your workspace: another workflow's run fails or succeeds, a workflow is deployed, or an alert condition like a latency spike or cost threshold is met. Use it to build side-effect workflows — alerting, escalation, auto-remediation — composed from any blocks (Slack, email, webhooks, custom logic).
1010

1111
## Events
1212

13-
Pick one event per Sim trigger block:
13+
Pick one event per Sim Workspace Events trigger block:
1414

1515
**Plain events** — fire on every occurrence:
1616

@@ -68,8 +68,8 @@ All events include `event`, `timestamp`, `workflowId`, and `workflowName` (the s
6868
## Behavior
6969

7070
<ul className="list-disc space-y-1 pl-6">
71-
<li>The workflow containing the Sim trigger must be <strong>deployed</strong> for events to fire.</li>
72-
<li>Runs started by a Sim trigger never emit workspace events, so side-effect workflows cannot chain or loop.</li>
71+
<li>The workflow containing the Sim Workspace Events trigger must be <strong>deployed</strong> for events to fire.</li>
72+
<li>Runs started by a Sim Workspace Events trigger never emit workspace events, so side-effect workflows cannot chain or loop.</li>
7373
<li>Alert conditions fire at most once per cooldown window (one hour, or the inactivity window for No Activity).</li>
7474
<li>Event delivery is fire-and-forget: side-effect runs are billed like any other run and are subject to workspace rate limits.</li>
7575
</ul>
@@ -80,8 +80,8 @@ All events include `event`, `timestamp`, `workflowId`, and `workflowName` (the s
8080
</Callout>
8181

8282
<FAQ items={[
83-
{ question: "Why isn't my Sim trigger firing?", answer: "The workflow containing the trigger must be deployed — events only fire for deployed workflows. Also note the trigger never fires for the workflow it lives in, and runs started by another Sim trigger don't emit events." },
84-
{ question: "Can a Sim-triggered workflow trigger other Sim triggers?", answer: "No. Runs started by a Sim trigger never emit workspace events. This prevents chains and infinite loops — an alert workflow that fails can't re-trigger itself." },
83+
{ question: "Why isn't my Sim Workspace Events trigger firing?", answer: "The workflow containing the trigger must be deployed — events only fire for deployed workflows. Also note the trigger never fires for the workflow it lives in, and runs started by another Sim Workspace Events trigger don't emit events." },
84+
{ question: "Can a workflow started by a Sim Workspace Events trigger fire other Sim Workspace Events triggers?", answer: "No. Runs started by a Sim Workspace Events trigger never emit workspace events. This prevents chains and infinite loops — an alert workflow that fails can't re-trigger itself." },
8585
{ question: "How often do alert conditions fire?", answer: "At most once per cooldown window per trigger block. Most conditions use a one-hour cooldown; No Activity uses the configured inactivity window, evaluated per watched workflow." },
8686
{ question: "What unit is cost in?", answer: "Credits, both for the Cost Threshold configuration and the cost field in event payloads." },
8787
]} />

apps/sim/blocks/blocks/sim_workspace_event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const SimWorkspaceEventBlock: BlockConfig = {
88
// can scrape the type for icon-map keys; a test asserts it stays equal to
99
// the constant.
1010
type: 'sim_workspace_event',
11-
name: 'Sim',
11+
name: 'Sim Workspace Events',
1212
description:
1313
'Run this workflow when workspace events occur: run errors or successes, deployments, and alert conditions like latency or cost spikes.',
1414
category: 'triggers',

apps/sim/blocks/blocks/webhook_request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { RequestResponse } from '@/tools/http/types'
44

55
export const WebhookRequestBlock: BlockConfig<RequestResponse> = {
66
type: 'webhook_request',
7-
name: 'Webhook',
7+
name: 'Outgoing Webhook',
88
description: 'Send a webhook request',
99
longDescription:
1010
'Send an HTTP POST request to a webhook URL with automatic webhook headers. Optionally sign the payload with HMAC-SHA256 for secure webhook delivery.',

apps/sim/ee/access-control/components/access-control.tsx

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,28 @@ export function AccessControl() {
11701170
)
11711171
}
11721172

1173+
const deleteConfirmModal = (
1174+
<ChipConfirmModal
1175+
open={!!deletingGroup}
1176+
onOpenChange={() => setDeletingGroup(null)}
1177+
srTitle='Delete Permission Group'
1178+
title='Delete Permission Group'
1179+
text={[
1180+
'Are you sure you want to delete ',
1181+
{ text: deletingGroup?.name ?? 'this group', bold: true },
1182+
'? ',
1183+
{ text: 'All members will be removed from this group.', error: true },
1184+
' This action cannot be undone.',
1185+
]}
1186+
confirm={{
1187+
label: 'Delete',
1188+
onClick: confirmDelete,
1189+
pending: deletePermissionGroup.isPending,
1190+
pendingLabel: 'Deleting...',
1191+
}}
1192+
/>
1193+
)
1194+
11731195
if (viewingGroup) {
11741196
return (
11751197
<>
@@ -1479,7 +1501,7 @@ export function AccessControl() {
14791501
{filteredToolBlocks.length > 0 && (
14801502
<div className='flex flex-col gap-1.5 border-[var(--border)] border-t pt-4'>
14811503
<span className='font-medium text-[var(--text-tertiary)] text-xs uppercase tracking-wide'>
1482-
Tools
1504+
Integrations and Triggers
14831505
</span>
14841506
<div className='grid grid-cols-3 gap-x-2 gap-y-0.5'>
14851507
{filteredToolBlocks.map((block) => {
@@ -1638,6 +1660,8 @@ export function AccessControl() {
16381660
isAdding={bulkAddMembers.isPending}
16391661
errorMessage={addMembersError}
16401662
/>
1663+
1664+
{deleteConfirmModal}
16411665
</>
16421666
)
16431667
}
@@ -1784,25 +1808,7 @@ export function AccessControl() {
17841808
/>
17851809
</ChipModal>
17861810

1787-
<ChipConfirmModal
1788-
open={!!deletingGroup}
1789-
onOpenChange={() => setDeletingGroup(null)}
1790-
srTitle='Delete Permission Group'
1791-
title='Delete Permission Group'
1792-
text={[
1793-
'Are you sure you want to delete ',
1794-
{ text: deletingGroup?.name ?? 'this group', bold: true },
1795-
'? ',
1796-
{ text: 'All members will be removed from this group.', error: true },
1797-
' This action cannot be undone.',
1798-
]}
1799-
confirm={{
1800-
label: 'Delete',
1801-
onClick: confirmDelete,
1802-
pending: deletePermissionGroup.isPending,
1803-
pendingLabel: 'Deleting...',
1804-
}}
1805-
/>
1811+
{deleteConfirmModal}
18061812
</>
18071813
)
18081814
}

apps/sim/triggers/sim/workspace-event.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ describe('sim workspace event trigger registration', () => {
3434
})
3535
})
3636

37-
it('is named Sim', () => {
38-
expect(SimWorkspaceEventBlock.name).toBe('Sim')
39-
expect(simWorkspaceEventTrigger.name).toBe('Sim')
37+
it('is named Sim Workspace Events', () => {
38+
expect(SimWorkspaceEventBlock.name).toBe('Sim Workspace Events')
39+
expect(simWorkspaceEventTrigger.name).toBe('Sim Workspace Events')
4040
})
4141
})
4242

apps/sim/triggers/sim/workspace-event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { TriggerConfig } from '@/triggers/types'
1010

1111
export const simWorkspaceEventTrigger: TriggerConfig = {
1212
id: SIM_WORKSPACE_EVENT_TRIGGER_ID,
13-
name: 'Sim',
13+
name: 'Sim Workspace Events',
1414
provider: SIM_TRIGGER_PROVIDER,
1515
description:
1616
'Triggers when workspace events occur: run errors or successes, deployments, and alert conditions like latency or cost spikes',

0 commit comments

Comments
 (0)