Webform_CiviCRM integration enables me to add contacts who submit a form to a Civi group. What I'd like to do is to remove them from another group at the same time, as part of a pipeline process. Drupal Rules module offers 'Remove contact from CiviCRM group' as an action, but I can't work out how to "select data of the type Contact" which seems to be what Rules is looking for in order to enable this action. How can I create a rule that removes a contact form a group based on the matched Drupal user submitting a webform (or perhaps based on the fact that the webform adds the contact to a group)?
Graham, you can do this with CiviRules? Trigger should be when contact is added to group, condition specifies what group and the related action is to remove contact from group.
Graham made a feature request and we got this feature in the CiviCRM Entity module, for doing this with Drupal Rules
Just added a rules action "Unassign contact from group" to the dev release of CiviCRM 2 days ago, along with "Assign contact to group"
This will be in beta7 when it gets released in a couple of weeks, after some new PRs get tested and merged in.
If you have the user object available in the Rule you can use the "Load or Create CiviCRM Contact" action, then the "Unassign Contact from Group" action to remove the contact from a group.
This issue had some basic instructions: https://www.drupal.org/node/2854256
Get the dev version here: https://www.drupal.org/project/civicrm_entity/releases/7.x-2.x-dev
or beta7 or above when it comes out...