You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4b61e06
Browse filesBrowse the repository at this point in the historyBrowse files
Budibase can easily be connected to Nextcloud and start automations reacting to Nextcloud events.
7
+
8
+
9
+
Using a Nextcloud webhook as automation trigger
10
+
-----------------------------------------------
11
+
12
+
When creating a new automation in Budibase, you can choose "Webhook" as trigger.
13
+
14
+
.. image:: images/new_automation.png
15
+
:alt:Budibase for creating a new automation, with highlighted "Webhook" button
16
+
17
+
Budibase shows a schema request URL you can use to send the expected payload schema in advance.
18
+
19
+
The easiest way to to this is to go to the Orchestration Gateway admin settings and click "Register new Budibase webhook":
20
+
21
+
.. image:: images/new_budibase.png
22
+
:alt:Orchestration Gateway dialog for registering a Budibase webhook
23
+
24
+
Here you can fill in the event you want your automation to be started by and the schema URL, and then send the schema. Budibase will show 4 detected bindings upon successful sending. You can then fill in the trigger URL provided by Budibase, all needed filters and the authentication tokens that should be included in the callback, and save.
25
+
As soon as you have your automation deployed, it will now be triggered every time your chosen event happens in Nextcloud.
26
+
27
+
28
+
29
+
Use payload information in bindings
30
+
-----------------------------------
31
+
32
+
For every event, there are 4 bindings registered in Budibase:
33
+
34
+
* ``user``: the user that triggered the Nextcloud event
35
+
* ``time``: a timestamp for the triggering
36
+
* ``event``: an array containing additional information about the event (see the :ref:`list of webhook events<webhook_events>` for details)
37
+
* ``authentication``: the requested authentication tokens
38
+
39
+
These bindings can be used in any step of your automation to use the information given by the callback.
Copy file name to clipboardExpand all lines: admin_manual/webhook_listeners/index.rst
+31-7Lines changed: 31 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,17 +36,33 @@ Enable the ``webhook_listeners`` app that comes bundled with Nextcloud - e.g.
36
36
37
37
occ app:enable webhook_listeners
38
38
39
-
Listening to events
40
-
-------------------
39
+
Managing webhooks
40
+
-----------------
41
41
42
-
You can use the OCS API to add webhooks for specific events. See:
42
+
You can either use the OCS API to manage your webhooks or install the additional ``orchestration_gateway`` app to have a graphical user interface for adding, changing and deleting webhooks.
43
+
44
+
the Orchestration Gateway adds an administration settings page listing your registered webhooks and making it easy to configure them.
45
+
46
+
.. image:: images/list_webhooks.png
47
+
:alt:Orchestration Gateway settings showing a list of registered webhooks
48
+
49
+
To add a new one, you can choose between a generic new webhook or a Budibase-specific one.
50
+
51
+
52
+
.. image:: images/new_webhook.png
53
+
:alt:Orchestration Gateway dialog for adding a new webhook
54
+
55
+
56
+
If you want to use the OCS API to add webhooks for specific events, see:
43
57
`Register a new webhook <https://docs.nextcloud.com/server/latest/developer_manual/_static/openapi.html#/operations/webhook_listeners-webhooks-index>`_.
44
58
45
-
Note: When authenticating with the OCS API to register webhooks, the account you
46
-
use must have administrator rights or delegated administrator rights.
59
+
.. note::
60
+
61
+
When authenticating with the OCS API to register webhooks, the account you use must have administrator rights or delegated administrator rights. To delegate the webhook registration to non-admin users, they have to be in a group that gets administration privileges for "Webhooks" granted. To use the Orchestration Gateway UI, they need *additional* privileges for "Orchestration Gateway".
47
62
48
-
Listing registered webhooks
49
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
+
64
+
Listing registered webhooks via occ
65
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
66
51
67
You can list all currently registered webhook listeners from the command line:
52
68
@@ -203,6 +219,8 @@ The complete logs of the workers can be checked with (replace 1 with the worker
203
219
204
220
It is recommended to restart this worker at least once a day to make sure code changes are effective and avoid memory leaks, in this example the service restarts every 60 seconds.
205
221
222
+
.. _webhook_events:
223
+
206
224
Nextcloud Webhook Events
207
225
------------------------
208
226
@@ -672,3 +690,9 @@ When the optional ``mail`` app is installed:
672
690
673
691
For filtering or automation, always check the actual payload you receive, as it matches
674
692
the JSON examples above, not PHPDoc or internal PHP array type style.
0 commit comments