email notifications on page changes

lawrence whittemore asked on August 2, 2017 15:50

Is there a way to have an email sent to specific users when content is updated? I tried using workflow and set it to send the Published email, i've set it to not use check in an check out as well as to auto publish changes, but it doesn't seem to send when the document is updated.

Recent Answers


Peter M answered on August 2, 2017 16:34

I would assume you want sent notification when specific fields have been updated. I would do it with global events:

DocumentEvents.Update.Before += DocumentUpdateBeforeEvent;

private void DocumentUpdateBeforeEvent(object sender, DocumentEventArgs args)
{
    TreeNode node = args.Node;
    if (node != null)  {
            if (node.ItemChanged("YourSpecificFieldName")) {
              // send email here ...
0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on August 2, 2017 16:45

Thanks for your help, i'm not a developer so I don't know if I can really do something like that myself.

Is there no way to do it with workflow? I just want when a document (within certain section of the tree) is updated, regardless of the field, to send a notification.

I was hoping to do it without having to turn off the auto publish as having to hit the submit button and then the publish button is a hassle.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 2, 2017 16:49

Lawrence, can you get us the details of your Workflow settings? Did you set the Scope of the workflow properly so it includes the document you are working on? What license do you currently have?

Did you try the steps in this article? https://docs.kentico.com/k10/managing-website-content/configuring-the-environment-for-content-editors/configuring-workflows/configuring-workflow-email-notifications

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on August 2, 2017 17:13

I've taken a look at the steps and it is probably me trying to do something that was not intended.

What I would like to have happen, when ever a new page type is added, or an existing page is edited that an email notification go it.

What I am trying to avoid is having to have the user who creates and make changes to these pages have to click the submit for approval button and then the publish button.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 2, 2017 17:19

Ah i get ya, yeah i think the built in Workflow hooks depend on these actions being taken, because in the background they are attaching to global event hooks.

You will probably need to go along the lines of Peter i'm afraid, adding your own Global event hooks requires a small bit of code (hook to the document update, from there i would probably see if it's part of a specific workflow, if it is then trigger a Email Template and pass it anything it may need, if anything is needed).

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on August 2, 2017 17:41

I think I just figured out what is going on. So it will do what I want, It just doesn't send an email to the person making the changes even if they are on the list.

I just added a second user to my test and it sent to them and not to me.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 2, 2017 17:45

Then i was wrong in my assumption, glad you are getting it figured out!

One tip that helps a ton, in Settings you can enable an Email History which will keep track of any sent emails for X # of days that you specify, i always turn this on because it can help a lot with knowing if something sent or not.

There is also an Email Debug web.config key that can be sent that puts the emails in the event log.

<add key="CMSLogEmails" value="true"/>
<add key="CMSDebugEmails" value="true"/>
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.