Skip to content

Commit

Permalink
Admin docs: More additions for windmill and webhooks
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Sep 12, 2024
1 parent 3e4ad44 commit f9798b1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions admin_manual/webhook_listeners/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ If you would like to enforce multiple criteria, you can simply pass multiple pro

You can also use additional comparison operators (``$eq, $ne, $gt, $gte, $lt, $lte, $in, $nin``) as well as logical operators (``$and, $or, $not, $nor``). For example use ``{ "time" : { "$lt": 1711971024 } }`` to accept only events prior to April 1st 2024 and ``{ "time" : { "$not": { "$lt": 1711971024 } } }`` to accept events after April 1st 2024.

Check failure on line 34 in admin_manual/webhook_listeners/index.rst

View workflow job for this annotation

GitHub Actions / Check spelling

nin ==> inn, min, bin, nine

Speeding up webhook dispatch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This app uses background jobs to trigger the registered webhooks. Thus, by default, webhooks will be triggered only every 5 minutes, as the default cron interval is 5 minutes.
To trigger webhooks earlier, you can set up a background job worker. The following command will launch a worker for the webhook call background job:

.. code-block:: bash
occ background-job:worker "OCA\\WebhookListeners\\BackgroundJobs\\WebhookCall"
It is recommended to restart this worker once a day to make sure code changes are effective and avoid memory leaks, for example by registering it as a systemd service with a daily timer.

Nextcloud Webhook Events
------------------------

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion admin_manual/windmill_workflows/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ Approval/Suspend steps

Windmill allows using so-called approval steps, which are essentially asynchronous scripts that wait for the call to an additional webhook URL. The most prominent use case for this are approval workflows where you get automated input from somewhere which needs to be approved by a human. Once the human approves or disapproves by triggering the webhook URL the workflow will resume.

In order to turn a newly added step into an approval step, the workflow edit screen, select the script and in the bottom right pan, go in the "Advanced" tab, "Suspend" sub tab and check "Suspend/Approval/Prompt".

.. image:: images/windmill_approval_step_config.png
:alt: Screenshot of the workspace edit screen to turn a normal step into an Approval step

Using the scripts provided for Nextcloud, you can send approval links to the humans in charge of approving via Nextcloud Talk or a simple notification in Nextcloud. Of course, you may also use any of the other scripts for sending messages available in the Windmill hub.

Windmill has a default approval user interface at a specific URL, but it is not very nice. We recommend using the ``approve_links`` apps which allows creating a beautiful temporary approval page with a custom message and approve and disapprove buttons.
Windmill has a default approval user interface at a specific URL, but it is not very nice. We recommend using the `approve_links <apps.nextcloud.com/apps/approve_links>`_ app which allows creating a beautiful temporary approval page with a custom message and approve and disapprove buttons.

0 comments on commit f9798b1

Please sign in to comment.