create_smart_webhook
Create a validated ERPNext webhook for a target DocType and URL, choosing trigger events, headers, condition, timeout, and payload format. Validation and security checks are applied automatically.
Instructions
Create a new Webhook with automatic validation and security features
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"webhook_doctype": "<webhook_doctype>",
"webhook_url": "<webhook_url>"
},
"name": "create_smart_webhook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | No | Whether webhook is enabled (1/0, optional, defaults to 1) | |
| timeout | No | Timeout in seconds (optional, defaults to 5) | |
| condition | No | Condition for when to trigger webhook (optional) | |
| webhook_url | Yes | Webhook URL to send data to | |
| webhook_events | No | Events to trigger webhook on | |
| request_headers | No | Request headers as key-value pairs (optional) | |
| webhook_doctype | Yes | Target DocType for webhook events | |
| request_structure | No | Request structure (Form URL-Encoded/JSON, optional) |