Trigger - email notifcation


#1

Hey guys,

 

I'm setting up a basic email trigger set on events ( based off the manual)

I have found that an email trigger seems to only works when a site asset is set.

I would like to set it up on individual root nodes that are not specifically a site asset ( example a folder asset - and children)

 

We don't want to specifically email the coordinators every time an assets metadata is altered on assets defined under the site asset.

 

 

Am I missing somthing?

 

 


(Tbaatar) #2

Have you tried setting up another trigger with specific root node other then the site asset? for example image thumbnail?

If this works then it might be a glitch with Matrix, otherwise your Trigger is setup wrong.

 

Also it might be worth passing secondary condition (Has a Child / Parent) with the site asset set as root node.

 

So the trigger will check the site root, then it will check the parent Assed type or ID then fire the email.

 

 

I hope it helps.


#3

Have you tried setting up another trigger with specific root node other then the site asset? for example image thumbnail?

If this works then it might be a glitch with Matrix, otherwise your Trigger is setup wrong.

 

Also it might be worth passing secondary condition (Has a Child / Parent) with the site asset set as root node.

 

So the trigger will check the site root, then it will check the parent Assed type or ID then fire the email.

 

 

I hope it helps.

Thanks so much for a quick reply!

 

Yes I initially set up with individual nodes and it didn't work. I added the site asset node as well and then it worked ( but of course it passes everything under the site asset that I have defined in the trigger (standard pages).

 

That's a hell of allot of spam. We have two conditions we are checking for.


#4

I tried adding that extra condition for has/parent however each time  I tried to save it would not retain my asset ID that i set.

I also though I would just try just setting one tree location initially as well and no love.

 

so basically my trigger is

events

  1.  asset updated
  2.  asset meta updated

 

conditions

  1. asset is of type - standard page and redirect
  2. tree location (specific nodes under site asset) - only seems to work when I use the site asset set as the root node.
  3. Tried extra condition (has parent)

action

email me =)


(Bart Banda) #5

Your trigger will often run twice with those events as asset updated will run when asset metadata updated happens. You should only need asset updated if you are listening for all updates. 

 

What happens if you remove the tree location condition all together?

 

Also, when you don't get an email, can you check the Matrix logs to see if the trigger still runs or errors for any reason?


#6

Thanks heaps Bart I will remove the asset meta event. I defo don’t want the trigger to run more than it needs.

If I remove the tree location condition - would I define the has/child parent condition? Or is this just to test if there is something buggy?


Ooo and yes ill check the logs as well!


(Bart Banda) #7

Yea you shouldn't really need the has parent condition as it just adds extra queries each time the trigger runs, you should only need is of type and tree location. But yea, I would just try and use the asset if of type first, see if that works, then add a tree location condition. Make immediate child only is not ticked if you want to run it on assets on any level from the root node. 


#8

Hey Bart,Thanks heaps for your help

 

if I remove the tree location the trigger works - but I really just want specific nodes - otherwise with the amount of assets we have in the system it will be spam city.

As soon as I add a tree location and select a specific node in our site - no results.

 

I checked the  systems logs and the trigger fired sucessfully - but no email =(

[trigger.success - ] (Trigger Execution Success) - SUCCESS Trigger "Asset Updated" (#447), Event: "trigger_event_asset_updated" broadcast by Asset: "Error 404 page not found" (#4428)


(Tbaatar) #9

Have you tried without the tree location, but with the following conditions:

 

1. Asset Type

2. Has Parent (ID)


#10

Actually I hadn’t tried just by itself. I still had tree location. Thanks for the suggestion I will give it a whirl.


(Bart Banda) #11

What does the send email action look like? Does it rely on any specific content from the asset that is firing it? Or are you just hardcoding some fixed values for to address, from address, and subject?


#12

Hey Bart,

 

I've just set  the general email setting to - email  me and the body of the email is just sending information about the asset

 

Type: %asset_type% Name: %asset_name%
URL: %asset_url%
ID: #%asset_assetid%
Verson: %asset_version%
By: %asset_updated_by_name%
Time: %globals_date%

 

I have tried also  to try and get to send the email to my LDAP user as well and nothing comes through. It seems it is only working with  the tree location set for the whole site =( I thought it may have also appeared in myspace. But no where to be seen.


#13

Have you tried without the tree location, but with the following conditions:

 

1. Asset Type

2. Has Parent (ID)

Ello there ! Thanks for the suggestion but I tried this and still no email results =(


(Bart Banda) #14

I was more thinking of the from and to and subject settings of your email trigger. Maybe the email sends but there is something in those fields that is blocking it by a spam filter on an email server somewhere or a dynamic keyword that is printing nothing? 


#15

Thanks Bart I might have a play with the from email. We use our no-reply email address. It doesn’t explain why it sends and works perfectly when the tree location it set for the whole site. I would have thought it just wouldn’t send full stop?


#16

Hey Guys,

I'm back looking at this one again  - running 4.18.0

 

Emails are  not getting blocked

the tree location set for a whole site asset - sends the emails.

Tree location on folder assets - sends the email.

Just not tree location for a standard page  no love. 

I just don't get it.

 

I have tried the has parent/child as well and no love.

 

it is odd.. really odd. I might just try and create a brand new trigger


#17

yep and rebuilt the trigger with no love - damn


(Bart Banda) #18

If tree location on folder assets work, but not standard pages, there must be something that's easily fixed.

 

Can you post a screenshot of your trigger event, conditions, and action?


#19

Hey Bart thanks,

 

I just rebuilt the trigger to test  if it sent anything. I tried moving  the conditions around as well - no love. I added in "page" as well to grab at anything. The 404 page is a standard page and it will send emails if I edit the asset when the tree node is defined for the whole site. In the manuals however it does use an example of a site asset - so maybe the action won't work defined down to specific nodes.

 


(Bart Banda) #20

Hmm, maybe try and use asset id condition instead, as if you set that as tree location condition, it might only trigger on assets UNDER the specified root node, not the root node istelf, as that's what the condition note is suggesting...