Send email only if the app is pending approval.

Hi. I have a requirement. I want to create a rule where it should only send email to admin of dev portal when the app is requiring approval. If the app is auto approved, no need to send any email. If the app is pending approval, it should send email saying that person A has created app A and it requires approval. Out of the box I don't see this option in dev portal. How do I do that?

1 4 391
4 REPLIES 4

Did you try the rules module?

This answer may help. (It's from 2015, but still applies).

Yes I am using rules. Rules is only allowing me to send email if an app is created. There is no option to check if the app's overall status is approved or pending. My condition is that if the app is approved (bcuz the product is auto approval), there should be no email. If the app is pending (bcuz the product is approval pending), then it should send email. Rules is only sending email if the app is created regardless of its status.

Hi @Dino-at-Google , link you share, I couldn't open it link shared. So added answer, if u find this is duplicate, plz ignore or remove.

  • Install Rules and RulesUI via drush or manual
  • Go to admin/config/workflow/rules
  • Add new rule:
    Name: Give the Rule Name: Ex: Upon the app creation
    React on Event: Upon Creation of developer App
    Save
  • .Next if you like Add condition
    Select Action-Choose Send an email or send HTML e-mail and continue
  • TO:
    The email address you wish to send Ex: Portal Admin
  • SUBJECT:

2 Options:

1. Use Static Text for Subject

2. Use Drupal Replacement Pattern

Ex: [app:name] by [app:developer], here [app:name] = App Name, [app:developer] = Name of the Developer

  • Save

Note: You can also export this config to diff env.

Yes I have done that. My requirement is that if an app is created, the email should only be sent if the overall status of app is pending. If the overall status is approved because the product is auto approval, it should not send email.