Flag module provides integration with the Rules module. For this the "Actions" submodule is NOT needed. It only provides integration with core actions. The integration in 7.x-3.x is fully functional.

Rules is a more powerful replacement for Drupal's built-in Actions (and Trigger). It lets you "script" your site, using an easy administrative GUI, in response to various events. Rules, in short, is an alternative to that glue code you use to write in little custom modules.

Flag module provides the following Rules actions:

  • Flagging and unflagging items (on behalf of any user).
  • Trimming flags (restricts the number of items in a flag list, similar to NodeQueue).
  • Fetching the overall flag count (fetches the total count for a flag).
  • Fetching the entity flag count (fetches the total count for a flag for a particular entity).
  • Fetching the user flag count (fetches the total count for a flag by a user).

Flag module provides the following Rules conditions:

  • Finding out if an item is flagged over a certain number of times.
  • Finding out if an item is flagged by a certain user.

Flag module provides the following Rules events:

  • On flagging and unflagging of items.

Comments

Rosamunda’s picture

Does it allow to "bulk" flagging?

turion’s picture

Maybe you could achieve this by using Views Bulk Operations?

katearcher’s picture

Is there a way to use flag fields in Rules?

System Lord’s picture

What do you do with "Fetch"? Fetch to where? See fetched data where? I have a rule event: A user has been flagged. Action: Fetch users who have flagged a User

I want a page that shows a user all the other users that "Liked" them. The rule above seems to collect it but how do I display?

bluesman2014’s picture

Did you find out how to do this? I'm trying to do the same thing.

Trey’s picture

What you are trying to do is actually more of a "Views" task. Rules are for creating an action based on an even and certain optional conditions, Views is pretty specifically for displaying data, and flags integrates nicely with it. Since users and nodes are both entities and handled similarly you should be able to follow: https://www.drupal.org/node/326308 to achieve what you want.

FGlendrange’s picture

Is there a way to make a rule that kicks in when a user has X flags divided over all his eg. forum comments?
Let's say that one individual has a tendency to write a lot of spam and after this user has accumulated over X flags, in total regardless what post they are on, they get a penalty of some sort.