I don't think you can (Simply!). the text for the email is taken from the language files (so you can update that if you put your own language file in config/lang/en-us.xml) .
but it really it just has below, and the method that calls it doesn't pass any details of the change.
Hi %0%
This is an automated mail to inform you that the task '%1%'
has been performed on the page '%2%'
by the user '%3%'
Go to http://%4%/#/content/content/edit/%5% to edit.
%6%
Have a nice day!
Cheers from the Umbraco robot
Is there a way to make a custom "trigger" for Send for approval?
I've already made a
public void Handle(ContentPublishedNotification notification)
But this only triggers when doing "SaveAndPublish" not when i do "Send for approval"
The only thing i find is this example on setting notification on the nodes themself, but this would only send the noti, to the email specified, but i wanna make it more dynamic, being able to send it for more than on user like my other "Handle".
Awesome, took me a few to figure out, but i was able to make a new class with ContentSentToPublishNotification
(ContentSendingToPublishNotification didn't trigger for me)
with my code looking like this (if anyone else have the same problem)
public class SendToPublishModel: INotificationHandler<ContentSentToPublishNotification>
{
public SendToPublishModel()
{
}
public void Handle(ContentSentToPublishNotification notification)
{
var id = notification.Entity.Id; // Test to get the right id - implement other code here
}
}
And added it to Program.cs .AddNotificationHandler<ContentSentToPublishNotification, SendToPublishModel>()
Our initial default solution worked for a while but we've stopped receiving notifications for 'send for approval' requests. Any suggestions on how to manage this. The custom solution above looks like it may work?
Send For Approval
Hi, When a user saved content and clicked to 'Send For Approval'. Who gets these requests to approve the content?
I can't find any documentation on this.
Many thanks
Hi,
They are sent to accounts where notifications have been setup on the nodes.
See https://docs.umbraco.com/umbraco-cms/tutorials/editors-manual/tips-and-tricks/notifications/
but essentially if you set up notifications on the root content item, you would get sent the notifications for all send for approval requests.
you also need to have the emails settings setup or it doesn't appear. (i think)
https://docs.umbraco.com/umbraco-cms/extending/health-check/guides/smtp
Hi Kevin,
Thanks, that's worked well.
Do you know if it's possible to include what has changed in the notification?
Many thanks
Hi,
I don't think you can (Simply!). the text for the email is taken from the language files (so you can update that if you put your own language file in
config/lang/en-us.xml
) .https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml#L1241
but it really it just has below, and the method that calls it doesn't pass any details of the change.
Hi Kevin,
Is there a way to make a custom "trigger" for Send for approval?
I've already made a
But this only triggers when doing "SaveAndPublish" not when i do "Send for approval"
The only thing i find is this example on setting notification on the nodes themself, but this would only send the noti, to the email specified, but i wanna make it more dynamic, being able to send it for more than on user like my other "Handle".
BR Mike
Hi
I actually think its.
ContentSendingToPublishNotification
andContentSentToPublishNotification
that fire when send for approval is used.not 100% sure but i would try them.
Hi Kevin,
Awesome, took me a few to figure out, but i was able to make a new class with
ContentSentToPublishNotification
(
ContentSendingToPublishNotification
didn't trigger for me)with my code looking like this (if anyone else have the same problem)
And added it to Program.cs
.AddNotificationHandler<ContentSentToPublishNotification, SendToPublishModel>()
Thanks alot!
Hi guys,
Our initial default solution worked for a while but we've stopped receiving notifications for 'send for approval' requests. Any suggestions on how to manage this. The custom solution above looks like it may work?
is working on a reply...