Git Product home page Git Product logo

flow_notifications's Introduction

Nextcloud Flow Notifications

πŸ“ Notification action for Nextcloud Flow

πŸ”© Configure your flow

πŸ”” Receive notifications

πŸ— Development setup

  1. ☁ Clone this app into the apps folder of your Nextcloud: git clone https://github.com/nextcloud/flow_notifications.git
  2. πŸ‘©β€πŸ’» In the folder of the app, run the command npm ci && npm run dev to install dependencies and build the Javascript.
  3. βœ… Enable the app through the app management of your Nextcloud
  4. πŸŽ‰ Partytime! Help fix some issues and review pull requests πŸ‘

πŸ§™ Advanced development stuff

To build the Javascript whenever you make changes, you can also use npm run build. Or npm run watch to automatically rebuild on every file save.

β™₯ How to create a pull request

This guide will help you get started:

✌ Code of conduct

The Nextcloud community has core values that are shared between all members during conferences, hackweeks and on all interactions in online platforms including Github and forums. If you contribute, participate or interact with this community, please respect our shared values. 😌

flow_notifications's People

Contributors

blizzz avatar dependabot[bot] avatar juliushaertl avatar morrisjobke avatar nextcloud-bot avatar nextcloud-command avatar nickvergessen avatar pvince81 avatar pytal avatar rakekniven avatar rullzer avatar skjnldsv avatar valdnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flow_notifications's Issues

folder notification

Is there a way to notify when a file is uploaded to a specific folder?

Regards

Translations on notifier

I'd like to pass on the Entity to the Notifier, since as of triggering the notification, we do not know which users in which languages will receive it. The Entity brings methods that allow localizations for event names and event messages. The Entity therefore needs to know which event has happened and what subjects were connected to it (e.g. what happened to a file? And which node?).

We can pass subject parameters to the notification. They are stored json_encoded in the database. Serializing an IEntity is not possible (unless we'd require it for 20 in the server). But it might have nested objects, that'll be a rat tail.

An alternative would be to recreate the entity. We cannot do this in a complete manner and would need to add all sorts of weird [optional] methods that can be implemented by IEntities. A ReflectionClass seems to be exportable, not reimportable easily.

Notifying on new files in a folder

Taking a cue from an example elsewhere, I made a workflow action with Automatic Tagging.

  1. I have a folder tagged as "Print".
    1. The Automatic Tagging-flow then reacts on...
      1. File Change
      2. File is tagged "Print" (that is inherited from the folder)
      3. MIME type is not Folder
        1. Tag the file as "Notify"
    2. The Notifications-flow then reacts on...
      1. Tag Assigned
      2. File is tagged "Notify"
        1. Send a notification

The first part works like a charm. Files created in the "Print" folder inherit that tag, as do files in subfolders. Flow then gets triggered and adds the "Notify" tag. So far so good. The problem is that the Notification event never gets triggered.

image

It doesn't make any difference on which user I add the workflow.

Cannot build App

Hello, I'm not sure if I'm doing something wrong, but followed the instructions per the github page. Cloned into apps folder of Nexcloud changed directory to flow_notifications folder and ran command "npm ci && npm run dev"

  • npm ci command gives me:
Usage: npm <command>

where <command> is one of:
    access, add-user, adduser, apihelp, author, bin, bugs, c,
    cache, completion, config, ddp, dedupe, deprecate, dist-tag,
    dist-tags, docs, edit, explore, faq, find, find-dupes, get,
    help, help-search, home, i, info, init, install,
    install-test, issues, it, la, link, list, ll, ln, login,
    logout, ls, outdated, owner, pack, ping, prefix, prune,
    publish, r, rb, rebuild, remove, repo, restart, rm, root,
    run-script, s, se, search, set, show, shrinkwrap, star,
    stars, start, stop, t, tag, team, test, tst, un, uninstall,
    unlink, unpublish, unstar, up, update, upgrade, v, verison,
    version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /root/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
  • npm run dev command gives me:
> [email protected] dev /media/2TB-MIRROR/container-volumes/nextcloud/apps/flow_notifications
> NODE_ENV=development webpack --progress --config webpack.js

sh: 1: webpack: not found

npm ERR! Linux 5.4.0-42-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dev: `NODE_ENV=development webpack --progress --config webpack.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] dev script 'NODE_ENV=development webpack --progress --config webpack.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the flow_notifications package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     NODE_ENV=development webpack --progress --config webpack.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs flow_notifications
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls flow_notifications
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /media/2TB-MIRROR/container-volumes/nextcloud/apps/flow_notifications/npm-debug.log
  • The npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]~predev: [email protected]
6 silly lifecycle [email protected]~predev: no script for predev, continuing
7 info lifecycle [email protected]~dev: [email protected]
8 verbose lifecycle [email protected]~dev: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~dev: PATH: /usr/share/npm/bin/node-gyp-bin:/media/2TB-MIRROR/container-volumes/nextcloud/apps/flow_notifications/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
10 verbose lifecycle [email protected]~dev: CWD: /media/2TB-MIRROR/container-volumes/nextcloud/apps/flow_notifications
11 silly lifecycle [email protected]~dev: Args: [ '-c',
11 silly lifecycle   'NODE_ENV=development webpack --progress --config webpack.js' ]
12 info lifecycle [email protected]~dev: Failed to exec dev script
13 verbose stack Error: [email protected] dev: `NODE_ENV=development webpack --progress --config webpack.js`
13 verbose stack spawn ENOENT
13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:17:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /media/2TB-MIRROR/container-volumes/nextcloud/apps/flow_notifications
16 error Linux 5.4.0-42-generic
17 error argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
18 error node v8.10.0
19 error npm  v3.5.2
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error [email protected] dev: `NODE_ENV=development webpack --progress --config webpack.js`
24 error spawn ENOENT
25 error Failed at the [email protected] dev script 'NODE_ENV=development webpack --progress --config webpack.js'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the flow_notifications package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error     NODE_ENV=development webpack --progress --config webpack.js
25 error You can get information on how to open an issue for this project with:
25 error     npm bugs flow_notifications
25 error Or if that isn't available, you can get their info via:
25 error     npm owner ls flow_notifications
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]

Notification doesn't trigger on certain type of events

This app is great to allows users to configure their own notification system.

However, for some events of the list, the notification does not trigger.

From my point of view, it would make sense to remove these events from the list, to leave only events that really trigger the notifications.

Otherwise, it gives the impression the app is half-broken.

So far, events that are working good :

  • file updated
  • file renamed
  • file copied
  • tag assigned
  • file created (not working in combination with tag though see comment #18 (comment))

Events with buggy behavior :

  • file accessed : no notification
  • file deleted : see issue #37

No notification from groupfolders

I have a 'flow' set to notify when a file with a specific name is edited.
It works well for a file in a shared folder, but no notification is pushed for a file in a group folder.

I cannat enable Flow Notifications

I installed and enabled Flow Notifications on NextCloud, but when I go in Flow page, there is nothing to using Flow Notifications. Can u help me? I just installed NextCloud 24.0 and i didnt customize anything yet.

Question: Notification only for specific folder/action

Scenario

  • A user (Joe) got a shared folder (Cute cat videos), where the owner of the folder (Judy) regularly upload/modify files.
  • Joe usually annoyed by the email/popup notifications from nextcloud, so, he turned off all notifications like this:
    KijelΓΆlΓ©s_220
  • Joe (of course) would like to get a notification about the shared folder, when new content uploaded, so, he set up a new Flow-notification with the following filter: /Cute cat videos\/.+$/i and set his email address: [email protected]
  • Joe thinks it will work.
  • In reality, seems not.

Notes

My opinion, the scenario, when a user (Joe) will get email notifications in general + flow-notification email, which redundant, is not really what a user (Joe) wants.
I guess, when the notification will be sent to 3rd party user, that's could be ok and useful.
Our users in opposit, usually annoyed by the lot of email notifications and there is no way to filter out the noise and only keep some specific changes.
I could imagine a workaround, using a dummy/technical/proxy user, where this dummy could get all the notifications and its Flow-notification settings contain the filter and real target user's email address, but it seems a bit overkill.

Questions

  • Is this flow notification supposed to work like this?
    Only send notification, when the user enabled the email notifications in general for files?
  • How could a user suppress all email notifications about files in general and only enable notifications for specific folders?

Thanks

No notification when a file is created

i set up two rules:
Screenshot ablΓ€ufe
The same test-tag is beeing used. When I (using a shared link of a tagged folder) delete a file I get the push notification to my phone and the bell in the webgui lights up too - so far so good.
If i create a file I sadly dont get the notification pushed to my phone, the webgui "bell" works.

Any insight/help would be much appreciated.

System details:
NC version: 20.0.8
Flow Notifications version: 1.0.3

Client details:
iOS version: 14.4.1
Nextcloud app version: 3.3.0

Sincerly Calvin

To hide list of files during upload, display progress bar instead

Enhancement: The component works well - thank you for developing it, butI'd have some proposal for UI/UX change:

I sugest to change the behavour and screen layou the way, that list of files would be hidden by default, instead of it there will be upload summary (total files count, total upliad size ...) and progress bar that would respect current percentage od upload done (either by files count or files size - the size is better I guess ...), time estimation ... etc.

The reason for this request is that if there is a plenty of files to upload (which - I guess - is the case why the component was created; in my case around 7000 files), the page drastically slows down with the full file list (sometimes froze comletly), also memory consumption and processor utilization are very high.
Moreover the list of individual files tells nothing obout overall upload status.

THe full file list could be available on demand - by pressing on the separate button (and inthe visual form could be generated at the press moment).

More than one email address on notification target

Scenario

I try to set up at least two emails for the notification, like this:
KijelΓΆlΓ©s_221

As I tried out this setup, I only got email notification only for the first one, in the example above, only for joe. Judy never gets email.

Q: How can I set more than one email addresses for notification?

Thanks!

Push notification

Is it possible to combine your notifications with push notifications for mobile?
And how can I create global file processing? (Configure global flow)

Notifications don't trigger for actions initiated by yourself

I have set up a simple test case:

image

The NC Talk flow is just there to verify that I didn't misconfigure the conditions. When I edit/rename a file called test.md to test1.md (or vice versa), I get a message in Talk but no notification.

NC version: 20.0.4
Flow Notifications version: 1.0.3

Feature: send email notification to share recipients

I would like to be able to set up a flow that sends email notifications to all email sharing recipients with access to an affected file.

Our use case is that we have a group folder (https://apps.nextcloud.com/apps/groupfolders) containing a subdirectory for each of our clients used for bi-directional data sharing with the client, each of which is shared to the applicable client by email. When we upload files to those client directories, we would like the applicable client to be sent an email notifying them of the data.

Preferably, this could be set up at the administrative level, but it could be worked around at the user level as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.