-
Notifications
You must be signed in to change notification settings - Fork 3k
feat(blocks): add Webhook tool for sending HTTP requests #2400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(blocks): add Webhook tool for sending HTTP requests #2400
Conversation
Fixes simstudioai#2379 - Add WebhookNotificationBlock with category 'tools' - Supports POST/PUT/PATCH methods with custom headers and body - Uses existing http_request tool under the hood - Available in Agent tools and HITL notifications
|
@DeepakSilaych is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
Greptile OverviewGreptile SummaryAdds a new Webhook tool block that enables sending HTTP POST/PUT/PATCH requests to external endpoints. The block properly integrates with the existing architecture by:
The implementation correctly fixes issue #2379 where users couldn't find a Webhook option in the HITL notification section. Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant HITL as Human in the Loop Block
participant Webhook as Webhook Notification Block
participant HTTPTool as http_request Tool
participant External as External Webhook Endpoint
User->>HITL: Configure notification
HITL->>HITL: Show tool dropdown (category: 'tools')
User->>Webhook: Select "Webhook" from dropdown
User->>Webhook: Configure URL, method, headers, body
Note over HITL: Workflow pauses
HITL->>Webhook: Trigger notification
Webhook->>HTTPTool: Execute with params (url, method, headers, body)
HTTPTool->>External: Send HTTP request (POST/PUT/PATCH)
External-->>HTTPTool: Return response
HTTPTool-->>Webhook: Return {data, status, headers}
Webhook-->>HITL: Notification sent
Note over HITL: Wait for approval
User->>HITL: Approve/Resume
HITL->>User: Workflow continues
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (3)
-
apps/sim/blocks/blocks/webhook_notification.ts, line 5 (link)style: use
WebhookIconfrom@/components/iconsinstead of lucide-react for consistency with other blocksNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
apps/sim/blocks/blocks/webhook_notification.ts, line 1-6 (link)style: remove unused
createElementimport and helper function since we should useWebhookIconfrom@/components/iconsNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
apps/sim/blocks/blocks/webhook_notification.ts, line 20 (link)style: reuse the same icon reference pattern used in the existing
WebhookBlockatapps/sim/blocks/blocks/webhook.ts:42Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
2 files reviewed, 3 comments
|
I did consider the minimal fix: just include the existing I chose the dedicated Webhook tool (category
That said, if we prefer the smallest diff and don’t mind |
|
If we choose to use the sim/apps/sim/blocks/blocks/api.ts Line 15 in f9cfca9
|
|
Can this be merged? |
Adds a new Webhook tool block that allows sending HTTP requests to external webhook endpoints. This fixes the bug where users couldn't find a Webhook option in the Human in the Loop notification section as documented.
The block has
category: 'tools'so it appears in:Fixes #2379
Type of Change
Testing
Also verify the Webhook tool appears in Agent block's tool selector.
Checklist
Screenshots/Videos