How to automate notifications subscribtions with Automation ?

Hi,

I use Automation to create new Workspaces, upload files and so on. I need to inform by mail different addresses when files are uploaded in different workspaces. How can it be done with Automation ? It seems there's nothing of the sort in the documentation.

0 votes

1 answers

1073 views

ANSWER



Hi, What you are looking for is probably the send email operation: http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewOperation/Notification.SendMail

To find the list of all operations and there documentation, the explorer is probably the ressource you need: http://explorer.nuxeo.org/nuxeo/site/distribution/current/listOperations

Cheers

Fred

0 votes



Hello,

Is it possible to send a mail to a group of users with this operation?

02/12/2013

I suppose Notification.SendMail can be used in my scripts when I upload files with Automation. But if users upload files through the web interface of Nuxeo, no notifications will be send. My problem is that some times I'll upload through Automation, sometimes users will do it themselves and in any cases they want notifications to be sent.
02/12/2013

@Flav : your question is different, please create a new question :) @EricS : In that case, use this operation on an automation chain bound to an event handler on "document created". So that whatever way used to create the document, the notification will be sent.
02/12/2013

Thanks for your help. I'm afraid I don't know much about automation chains. Though, I don't see how it can help me specifying the recipients of the notification (who are dependant of the workspace). I suppose I can call the chain with parameters in a script so there's no problem here. But how can I specify the notification recipients of the current workspace when the chain is called by an event ? Nuxeo doesn't know the relation between recipients and workspaces since I created the workspace with Automation and I coudn't give him the recipients of notification the same way.
02/13/2013

Maybe, in your case, you do not need to use Automation and Studio: http://doc.nuxeo.com/x/RIEk

plus an example on how to extend the alerts:

http://www.nuxeo.com/blog/development/2012/03/qa-friday-notification-deleted-document/

02/13/2013