Skip to content

Commit e737901

Browse files
chore(blocks): rename webhook block (#5900)
1 parent 5c42779 commit e737901

9 files changed

Lines changed: 17 additions & 28 deletions

File tree

apps/docs/components/workflow-preview/block-display-workflows.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ export const BLOCK_DISPLAY_WORKFLOWS: Record<string, PreviewWorkflow> = {
326326
},
327327
webhook_trigger: {
328328
id: 'webhook_trigger',
329-
name: 'Webhook',
329+
name: 'Webhook Trigger',
330330
blocks: [
331331
{
332332
id: 'webhook_trigger',
333-
name: 'Webhook',
333+
name: 'Webhook Trigger',
334334
type: 'webhook',
335335
bgColor: '#10B981',
336336
position: { x: 0, y: 0 },

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: Outgoing Webhook
3-
description: The Outgoing Webhook block sends an HTTP POST to an external endpoint, with automatic headers and optional signing.
2+
title: Webhook
3+
description: The 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 Outgoing Webhook block sends HTTP POST requests to external webhook endpoints with automatic webhook headers and optional HMAC signing.
11+
The 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 Outgoing Webhook starts a process in another system.
80+
When the Condition passes, the Webhook starts a process in another system.
8181

8282
<Callout>
83-
The Outgoing Webhook block always uses POST. For other HTTP methods or more control, use the [API block](/workflows/blocks/api).
83+
The 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 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." },
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." },
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 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." },
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." },
9292
]} />

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/toolbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ function syncCachesToOverlayVersion(version: number) {
173173

174174
/**
175175
* Gets triggers data, computing it once per overlay version and caching for
176-
* subsequent calls. Non-integration triggers (Start, Schedule, Webhook) are
176+
* subsequent calls. Non-integration triggers (Start, Schedule, Webhook Trigger) are
177177
* prioritized first, followed by all other triggers sorted alphabetically.
178178
*/
179179
function getTriggers(overlayVersion: number): BlockItem[] {
180180
syncCachesToOverlayVersion(overlayVersion)
181181
if (cachedTriggers === null) {
182182
const allTriggers = getTriggersForSidebar()
183-
const priorityOrder = ['Start', 'Schedule', 'Webhook']
183+
const priorityOrder = ['Start', 'Schedule', 'Webhook Trigger']
184184

185185
const sortedTriggers = allTriggers.sort((a, b) => {
186186
const aIndex = priorityOrder.indexOf(a.name)

apps/sim/blocks/blocks/generic_webhook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const WebhookIcon = (props: SVGProps<SVGSVGElement>) => createElement(Webhook, p
88

99
export const GenericWebhookBlock: BlockConfig = {
1010
type: 'generic_webhook',
11-
name: 'Webhook',
11+
name: 'Webhook Trigger',
1212
description: 'Receive webhooks from any service by configuring a custom webhook.',
1313
category: 'triggers',
1414
icon: WebhookIcon,
@@ -17,7 +17,7 @@ export const GenericWebhookBlock: BlockConfig = {
1717
triggerAllowed: true,
1818
bestPractices: `
1919
- You can test the webhook by sending a request to the webhook URL. E.g. depending on authorization: curl -X POST http://localhost:3000/api/webhooks/trigger/d8abcf0d-1ee5-4b77-bb07-b1e8142ea4e9 -H "Content-Type: application/json" -H "X-Sim-Secret: 1234" -d '{"message": "Test webhook trigger", "data": {"key": "v"}}'
20-
- Continuing example above, the body can be accessed in downstream block using dot notation. E.g. <webhook1.message> and <webhook1.data.key>
20+
- Continuing example above, the body can be accessed in downstream block using dot notation. E.g. <webhooktrigger1.message> and <webhooktrigger1.data.key>
2121
- To deduplicate incoming events, set the Deduplication Field to a dot-notation path of a unique field in the payload (e.g. "event.id"). Duplicate values within 7 days will be skipped.
2222
- Only use when there's no existing integration for the service with triggerAllowed flag set to true.
2323
`,

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: 'Outgoing Webhook',
7+
name: '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/lib/workflows/triggers/trigger-utils.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import { createLogger } from '@sim/logger'
22
import { toError } from '@sim/utils/errors'
33
import { isInputDefinitionTrigger } from '@/lib/workflows/triggers/input-definition-triggers'
4-
import {
5-
type StartBlockCandidate,
6-
StartBlockPath,
7-
TRIGGER_TYPES,
8-
} from '@/lib/workflows/triggers/triggers'
4+
import { type StartBlockCandidate, StartBlockPath } from '@/lib/workflows/triggers/triggers'
95
import { getAllBlocks, getBlock } from '@/blocks'
106
import type { BlockConfig } from '@/blocks/types'
117
import type { BlockState, WorkflowState } from '@/stores/workflows/workflow/types'
@@ -239,10 +235,6 @@ export function getTriggerDisplayName(blockType: string): string {
239235
const block = getBlock(blockType)
240236
if (!block) return blockType
241237

242-
if (blockType === TRIGGER_TYPES.GENERIC_WEBHOOK) {
243-
return 'Webhook'
244-
}
245-
246238
return block.name
247239
}
248240

apps/sim/lib/workflows/triggers/triggers.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,6 @@ export class TriggerUtils {
356356
// Use the block's actual name from the registry
357357
const block = getBlock(triggerType)
358358
if (block) {
359-
if (triggerType === TRIGGER_TYPES.GENERIC_WEBHOOK) {
360-
return 'Webhook'
361-
}
362359
return block.name
363360
}
364361

apps/sim/stores/modals/search/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export const useSearchModalStore = create<SearchModalState>()(
145145

146146
const allTriggers = getTriggersForSidebar()
147147
const filteredTriggers = filterBlocks(allTriggers) as typeof allTriggers
148-
const priorityOrder = ['Start', 'Schedule', 'Webhook']
148+
const priorityOrder = ['Start', 'Schedule', 'Webhook Trigger']
149149

150150
const sortedTriggers = [...filteredTriggers].sort(
151151
(a: (typeof filteredTriggers)[number], b: (typeof filteredTriggers)[number]) => {

apps/sim/triggers/generic/webhook.ts

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

55
export const genericWebhookTrigger: TriggerConfig = {
66
id: 'generic_webhook',
7-
name: 'Generic Webhook',
7+
name: 'Webhook Trigger',
88
provider: 'generic',
99
description: 'Receive webhooks from any service or API',
1010
version: '1.0.0',

0 commit comments

Comments
 (0)