Skip to main content
6 of 6
Included an importable
jan
  • 865
  • 1
  • 10
  • 26

I would create this using a Custom PHP code in Rules and execute the following conditional code on 'After saving new content of type...' event trigger :

if( count(taxonomy_get_term_by_name('[node:field-tags]')) ) return TRUE; 
else return FALSE;  

Then create an 'action to send an email'.

Requires
-PHP Filter,
-Rules.
-Here the content type assumes the default 'Article' with default Tags field 'field_tags'

{ "rules_tst" : {
"LABEL" : "Test Rule",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "php" ],
"ON" : { "node_insert--article" : { "bundle" : "article" } },
"IF" : [
  { "php_eval" : { "code" : "if( count(taxonomy_get_term_by_name(\u0027[node:field-tags]\u0027)) ) return TRUE; \r\nelse return FALSE;  " } }
],
"DO" : [
  { "mail" : {
      "to" : "[email protected]",
      "subject" : "test subject Toys confirmed!",
      "message" : "There are toys to play with!",
      "language" : [ "" ]
    }
  }
]

} }

I ahve included an importable for you to test.

jan
  • 865
  • 1
  • 10
  • 26