I'm new to CiviRules. I have a membership type that I want to be an event based membership in that I want users to users to be able to attend 5 events and then their membership is cancelled. I guess the rule would be: When active member on 'event membership' type attends 5 events their membership is cancelled and a renewal reminder email is sent. Can anyone help me with how to set this up?
I think the trigger should be 'participant changed' as you want to test this everyone time someone attends an event.
The first condition would be something like 'participant status changed to registered'.
I am not sure if you can combine membership conditions with a participant trigger, so checking the membership type would be weird (the data is not there when dealing with a participant of an event). But you could put all members in a group and then check if the participant is a member of that group.
The third condition would be to count if it is the fifth, I do not think there is a ready made condition for that, so it would have to be developed (probably about 4 hrs work).
The first action would be to send an email (you will need to install the Email API extension to do this: https://civicrm.org/extensions/e-mail-api).
The second action would be to cancel the membership. At the moment there is no action to do this, so that would need to be developed (approx. 4 hrs work).
I would recommend extensive testing too :-) CiviRules is powerful but also allows you to automatically send lots of emails.