diff --git a/frappe/docs/assets/img/webhook.png b/frappe/docs/assets/img/webhook.png new file mode 100644 index 0000000000..cbc16c1d76 Binary files /dev/null and b/frappe/docs/assets/img/webhook.png differ diff --git a/frappe/docs/user/en/guides/integration/webhooks.md b/frappe/docs/user/en/guides/integration/webhooks.md new file mode 100644 index 0000000000..bad812ed6e --- /dev/null +++ b/frappe/docs/user/en/guides/integration/webhooks.md @@ -0,0 +1,18 @@ +# Webhooks + +Webhooks are "user-defined HTTP callbacks". You can create webhook which triggers on Doc Event of the selected DocType. When the `doc_events` occurs, the source site makes an HTTP request to the URI configured for the webhook. Users can configure them to cause events on one site to invoke behaviour on another. + +#### Configure Webhook + +To add Webhook go to + +> Integrations > External Documents > Webhook + +Webhook + + + +1. Select the DocType for which hook needs to be triggered e.g. Note +2. Select the DocEvent for which hook needs to be triggered e.g. on_trash +3. Enter a valid request URL. On occurence of DocEvent, POST request with doc's json as data is made to the URL. +4. Optionally you can add headers to the request to be made. Useful for sending api key if required. diff --git a/frappe/integrations/doctype/webhook/webhook.json b/frappe/integrations/doctype/webhook/webhook.json index 4f3ba1c180..1823987534 100644 --- a/frappe/integrations/doctype/webhook/webhook.json +++ b/frappe/integrations/doctype/webhook/webhook.json @@ -70,7 +70,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 0, + "reqd": 1, "search_index": 0, "set_only_once": 1, "unique": 0 @@ -267,7 +267,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-09-09 13:07:14.169116", + "modified": "2017-09-09 20:05:43.406391", "modified_by": "Administrator", "module": "Integrations", "name": "Webhook",