I'm using profiles 2 and have (one or many) taxonomy terms that can be selected by a specific profile type. I have a webform that also has this taxonomy term in the select list. When the webform is submitted, if it matches one of many taxonomy terms in any of these profiles I want an email sent to those profiles. I can't figure out how to get Rules to do this. Any help is appreciated.
This is what I have so far. I just have it posting a message right now to test, but I want it to email, but I can't find the data I need to compare in the Rules.
{ "rules_webform_email" : {
"LABEL" : "Webform Email",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "webform_rules", "rules" ],
"ON" : { "webform_rules_submit" : [] },
"IF" : [
{ "webform_has_id" : {
"form_id" : [ "form_id" ],
"selected_webform" : { "value" : { "webform-client-form-3" : "webform-client-form-3" } }
}
},
{ "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "webform" : "webform" } } } }
],
"DO" : [
{ "drupal_message" : { "message" : "Test submit webform\r\n[data:project_type-value]\r\n[data:project_description-value]" } }
]
}
}
The project_type is the taxonomy term in the webform. I need to compare it with the field_service_provided (Term Reference field to the same taxonomy vocabulary) in the Profile.