From c06a21f0094b742d27fc27b51980c67f2e904b8e Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 29 Jun 2022 14:52:35 +1000 Subject: [PATCH] Detail the event data for folder_watcher (#22427) --- source/_integrations/folder_watcher.markdown | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/_integrations/folder_watcher.markdown b/source/_integrations/folder_watcher.markdown index 06a2dc7c1f7..533b80ed1df 100644 --- a/source/_integrations/folder_watcher.markdown +++ b/source/_integrations/folder_watcher.markdown @@ -55,6 +55,17 @@ folder_watcher: ## Automations +The elements the events contain are: +- `event_type`: matching the `event_type` of the filter (one of `created`, `moved`, `modified`, `deleted`, `closed`) +- `path`: The full path to the file (e.g. "/hello/world.txt") +- `file`: The name of the file (e.g. "world.txt") +- `folder`: The folder path (e.g. "/hello") + +When the `event_type` is `moved`, the file details are for the source file and destination details are included: +- `dest_path`: The full path to the moved file (e.g. "/hello/world.txt") +- `dest_file`: The name of the moved file (e.g. "world.txt") +- `dest_folder`: The folder moved path (e.g. "/hello") + Automations can be triggered on filesystem event data using a template. The following automation will send a notification with the name and folder of new files added to that folder: {% raw %}