Webform Handler Create
webform_handler_createCreate and attach a webform handler (email, webhook, etc.) to a Drupal webform, since handlers are plugins in webform config and cannot be created via JSON:API.
Instructions
Create a webform handler (email, remote post, etc.).
A handler is a plugin held inside the webform's own configuration --
there is no webform_handler entity and JSON:API cannot POST one.
This builds the plugin through plugin.manager.webform.handler and
attaches it with Webform::addWebformHandler(), which is the same
sequence Webform's own add-handler form runs.
id is the handler's id within the webform (email_confirmation,
not email); handler_type is the plugin (email, webhook,
auto_save, ...). configuration supplies plugin settings, which are
merged over the plugin's defaults -- the reply echoes the whole
resulting configuration so you can see what the defaults filled in.
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": {
"id": "<id>",
"webform_id": "<webform_id>",
"handler_type": "<handler_type>",
"label": "<label>"
},
"name": "webform_handler_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| label | Yes | ||
| webform_id | Yes | ||
| handler_type | Yes | ||
| configuration | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||