wordpress 4.9 civi 5.22 civirules 2.1 SMSAPI 1.5

No activity is added and no sms is sent

And this question doesn't meet quality standards so I'm adding some more text Provider is clickatell. I can send sms through Civi without using civirules. Worked fine previously. I’m not sure whether the upgrade to Civi 5.22 or the upgrade to civirules 2.1 is the cause as upgrades were contemporaneous. There are no error messages and I don’t know which logs might help. It’s 4am my time and I have been struggling for hours with a number of post upgrade issues with some excellent help from this forum. I eat muesli for breakfast, have 2 dogs 🐕 and consider civirules to be one of the most useful extensions ever (even though it is currently giving me grief.

  • and some excellent extra text you have added
    – petednz - fuzion
    Jun 27, 2018 at 20:16
  • This really isn't enough information to answer the question. Consider editing it to add the following: * Who is your SMS gateway provider (Twilio, Clickatell, etc.) * Can you send SMS through CiviCRM without using CiviRules? * Can you send messages through the provider's test interface? * Can you document steps you've taken (if any) to ensure the issue is with the SMS portion and not a problem with the rule or CiviRules? Jun 27, 2018 at 22:37
  • Cheers Pete 😎. Sorry Jon G
    – LesleyJill
    Jun 28, 2018 at 0:26
  • 1
    The first thing to do is to discover whether the problem is the sms-api extension or civirules. There are two ways to find that out. The first one is to setup a simple rule (e.g. contact is added to group, then action add tag to the contact). If that one is working try to add the sms action to the same rule and see if it still working. The other way to test it is to go the api explorer and use the entity SMS and action Send. Jun 28, 2018 at 7:10
  • Now I feel foolish (it was 4am!) An important piece of info. If the contact is manually added to the group in the admin backend then the SMS DOES send. It's when the contact is added to the group via a profile that the SMS does not send.
    – LesleyJill
    Jun 28, 2018 at 11:51

1 Answer 1


That was the clue - put a five minute delay on the sms action - the condition is checked again and Voila the sms is sent. So perhaps this needs to be added to the docs. It might be only the action "send sms" that needs a delay. Sending an email or adding a tag work fine via a profile.

  • @JaapJansma-CiviCooP & KarinG-SemperIT : I ran into a similar issue but using a webform instead of a profile. Worked only with a delay. I'm a bit fuzzy but it looks like the delayed task gets a $sourceContactId = CRM_Core_Session::getLoggedInContactID(); (sites/all/modules/civicrm/CRM/Activity/BAO/Activity.php) whereas the webform triggered one doesn't. My best guess is that the delayed task gets the ID of the rule author. BTW by "webform triggered" I mean a webform from an anonymous user creates an activity and that creation triggers the rule to send the SMS. Hmm, bug or feature?
    – wil_SRQ
    May 22, 2020 at 20:34
  • @KarinG-SemperIT : I thought the previous comment might interest you as well, but can't tag more than one guru.
    – wil_SRQ
    May 22, 2020 at 20:37
  • @Jaap Jansma - CiviCooP here I come begging for more git help. ErikH - CiviCooP gave me instructions to create a pull request that you accepted into CiviRules. I tried the same process with a patch to change the behavior noted in this question but Gitlab doesn't offer Development/Core as a destination for the merge request. Any guidance on how to merge lab.civicrm.org/SRQ_civicrm/core with Development/Core appreciated.
    – wil_SRQ
    Aug 11, 2020 at 21:33
  • The question is not related to the main question here. But did you check the documentation? See docs.civicrm.org/dev/en/latest/core/contributing/#make-changes for how to contribute to core Aug 13, 2020 at 11:16
  • Stumbled trying to submit a PR - lab.civicrm.org/dev/core/-/issues/2960#note_67362
    – wil_SRQ
    Nov 15, 2021 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.