Skip to content

Instantly share code, notes, and snippets.

@esolitos
Created August 3, 2018 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esolitos/8902bbeb913a24bbc96f54bd1816c46f to your computer and use it in GitHub Desktop.
Save esolitos/8902bbeb913a24bbc96f54bd1816c46f to your computer and use it in GitHub Desktop.
Example: Drupal 7 Twilio Poll + Rules
{ "rules_sms_vote" : {
"LABEL" : "SMS Vote",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "twilio_poll", "twilio" ],
"ON" : { "twilio_sms_incoming" : [] },
"IF" : [ { "twilio_poll_rules_is_valid_sms_poll" : { "sms" : [ "sms" ] } } ],
"DO" : [
{ "twilio_poll_rules_load_poll_from_sms" : {
"USING" : { "string" : [ "sms" ] },
"PROVIDE" : { "twilio_poll" : { "twilio_poll" : "A Twilio Poll" } }
}
},
{ "twilio_poll_rules_add_vote" : { "string" : [ "sms" ], "twilio_poll" : [ "twilio_poll" ] } }
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment