I use the Group module. I create a flag to mark groups. I wish that when a group is marked, an email is sent to all members of that group. How to do this ?
I created the following rule, but I find nothing in "conditions" in relation to the groups :
{ "rules_email_groupe" : {
"LABEL" : "Email groupe",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "flag" ],
"ON" : { "flag_flagged_achats_groupes" : [] },
"DO" : [
{ "mail" : {
"to" : "[email protected]",
"subject" : "Invitation \u00e0 la vente group\u00e9e de [flagged-group:title]",
"message" : "Bonjour,\r\n\r\n\r\nle groupe [flagged-group:title], vous invite \u00e0 sa vente group\u00e9e.\r\nElle commencera [flagging:field-flag-date:value] et se terminera [flagging:field-flag-date:value2].\r\n\r\n\r\nCordialement,\r\nL\u0027\u00e9quipe [site:name]\r\n[site:url]\r\n\r\nPour rester inform\u00e9 des nouveaut\u00e9s et b\u00e9n\u00e9ficier de nos offres promotionnelles, suivez-nous sur :\r\nhttps:\/\/www.facebook.com\/S1biosecom\r\nhttps:\/\/twitter.com\/S1biosecom\r\nhttps:\/\/plus.google.com\/+S1biosecom\r\nhttps:\/\/www.pinterest.com\/S1biosecom\r\n\r\nPS : ceci est un mail automatique, merci de ne pas y r\u00e9pondre.",
"from" : "[site:mail]",
"language" : [ "flagging-user:language" ]
}
}
]
}
}
Any suggestions?
Some more details about my setup:
- An overview of the Flags I've defined:
- More info about some of my fields (I also use Display Suite):
- The fields I defined for my Group Type "Entreprise":
Update: By using the Rules Component included in the answer to "http"https://drupal.stackexchange.com/questions/219440" I'm getting closer, but I still have to find out what to do with those 2 date variables I've to pass to that Rules Component, as shown here: