Actions

Last updated on
15 September 2022

Rules provides the following Actions, organized by category. (The machine name of each action is shown in parentheses.) Rules Essentials and many other modules also provide Actions for Rules - if you have one of those other modules installed on your site you will see those additional actions show up in your list.

You can see all the actions available on your site with drush rules:actions

Core Rules Actions

  • Ban
    - Ban an IP address  (rules_ban_ip)
  • Data
    - Calculates a numeric value  (rules_data_calculate_value)
    - Convert data  (rules_data_convert)
    - Add list item  (rules_list_item_add)
    - Remove item from list  (rules_list_item_remove)
    - Set a data value  (rules_data_set)
  • Entity
    - Delete entity  (rules_entity_delete)
    - Fetch entities by field  (rules_entity_fetch_by_field)
    - Fetch entity by id  (rules_entity_fetch_by_id)
    - Save entity  (rules_entity_save)
  • Path
    - Create any path alias  (rules_entity_path_alias_create)
    - Delete path alias  (rules_path_alias_delete_by_alias)
    - Delete all aliases for a path  (rules_path_alias_delete_by_path)
  • System
    - Show a message on the site  (rules_system_message)
    - Page redirect  (rules_page_redirect)
    - Send email  (rules_send_email)
  • User
    - Block a user  (rules_ban_ip)
    - Add user role  (rules_user_role_add)
    - Remove user role  (rules_user_role_add)
    - Send account e-mail  (rules_send_account_email)
    - Unblock a user  (rules_user_unblock)
  • Variable
    - Add a variable  (rules_variable_add)

You may also see many other site-specific actions appear, because Rules provides entity-specific actions for all entity types defined on your site. For example, each entity type will have its own action for creating that entity, listed under its own category. So you may see:

  • Comment
    - Create a new comment  (rules_entity_create:comment)

(The comment entity is provided by the core Drupal Comment module so this action will appear when you have the Comment module enabled.)

  • Content
    - Create a new content item  (rules_entity_create:node)

(The content entity is provided by the core Drupal Node module, which is always enabled.)

  • User
    - Create a new user  (rules_entity_create:user)

(The user entity is provided by the core Drupal User module, which is always enabled.)

Contributed modules that provide Rules Actions

This is not a complete list - many contributed modules integrate with Rules and provide their own Rules Actions.

Action for HTTP GET/POST
 - https://www.drupal.org/project/rules_http_client

Log to watchdog action
- https://www.drupal.org/project/rules/issues/2681761

SMS actions?
- https://www.drupal.org/project/rules_send_sms
- https://www.drupal.org/project/send_sms
- https://www.drupal.org/project/smsframework
- https://www.drupal.org/project/sms_rule_based
- https://www.drupal.org/project/sms_email_gateway

Rules set/get cookies? (these do session)
- https://www.drupal.org/sandbox/ioskevich/1754438
- https://www.drupal.org/sandbox/Shoseki/2099233
- https://www.drupal.org/sandbox/rdeboer/2813617 - cookies plus session

Rules Actions provided by Rules Essentials

Help improve this page

Page status: No known problems

You can: