Hi not sure where to put this:
I want to be able to send notifications to my Discord Channel when someone Downloads a file or files. I cant find anything to do this. Please help this would be greatly helpful and appreciated
Hi not sure where to put this:
Could be done with an rss bot and the activity app.
Or, could be possible with the webhooks app.
You’d have to figure out how to filter the results from the activity feed to only show what you want.
Since i have no experience in writing code or values …as i think the webhook app would work… ive tried what i know and even did flows. nothing lol you would think nextcloud would have this integration app but maybe imi wrong
Webhooks apps has been developed by a 3rd party.
It integrates into Flow as you know, but that needs an additional app
You can use this to write custom scripts to respond to the sorts of events you have described. Not sure how to write such a script, but this is where you would figure that out.
I looked into this general topic more and have more info. Bear with me:
- Found an open question on how to use webhooks with Discord.
- Webhooks does not yet support the kind of notifications you want by default. A full list of supported actions are described on the project readme mainpage, but I’ve listed them below:
Available Webhook events - copypasta of types supported when you click me
Fires whenever a calendar event is created.
Fires whenever a calendar event is edited (including meeting participant accepting/declining invitations).
Fires whenever a calendar event is soft-deleted (moved to trash).
Fires whenever a calendar event is permanently deleted (i.e. deleted from the trashbin).
Fires whenever a login attempt with an existing username fails.
Fires whenever user’s password is changed.
Fires whenever a new share is created.
Fires whenever a user account is edited. Includes values before and after edit.
Fires whenever a new user is created.
Fires whenever a user account is deleted.
Fires whenever user’s live status is updated to online (happens when user navigates between apps and doesn’t necessarily indicate that the status changed).
Fires whenever a user logs in successfully.
Fires whenever a user logs out successfully.
- File created
- File updated
- File renamed
- File copied
- File deleted
- Tag assigned
As far as sending the notification on a file upload or change, seems that is being done with external script support in flow…
curl -d @%f http://your.awesome.api/uploadfile
Or something like this.
Unfortunately required in this case. Here is a request on improving Webhooks configuration from the webui.
If you want to try this method you’ll need to install the download shared activity app and then apply your own filtering to the rss feed from activity.
See Activity tab in sidebar doesn’t show activity inside folder · Issue #45 · nextcloud/activity · GitHub
and RSS feed for Shared activity · Issue #464 · nextcloud/activity · GitHub
Thank you for replying ! i will check into all this. The RSS feed would have worked if the Activity settings button worked. jsut click and nothing. cant enable RSS. but i will definitely look at all of this
I thought of a way you could do this…
- Create a fake user with a name like “DIspatch”
- Confirm “Dispatch” will automatically accept whatever group or others shares you send to it without needing any additional confirmation, so you won’t need to login.
- Installed shared download activities app
- Enable RSS in activity app for “Dispatch”
- Configure activity app in user settings to only relay shared download activities
- Share RSS feed to your Discord using whatever RSS bot on that end.
Profit. Dispatch’s activity rss will now be relayed to your Discord room.
Main issue with this approach is it is not really scabable beyond one room per user created.
If you want to scale the activities of one user across multiple rooms you can use FreshRSS or a similar 3rd party service to filter and re-share that RSS feed… but, that obviously requires more tooling.