<automation name="Add users to a group when they join the site" version="11.0.0.0" description="Specify a group that users will be automatically added to when their account is created." id="d6ed947ee6a44dd5b5f3cf637a51d245" executeAsServiceUser="true" trigger="Event" lastModified="2019-06-21 22:54:12Z" provider="31f486cc-03b5-42b6-b5df-81cdd976aa59">
	<events>
		<event key="user.aftercreate" />
	</events>
	<executionScript language="JavaScript"><![CDATA[var groupId = core_v2_page.ParseQueryString(core_v2_widget.GetCustomValue('groupId', '')).Value('Group');
if(groupId === '') {
    return;
}

var userId = context_v2_automationTrigger.Arguments.Id;
var response = core_v2_groupUserMember.Create(groupId, userId, { GroupMembershipType: 'PendingMember', Message: 'Welcome to the welcome group!' });]]></executionScript>
	<configuration><![CDATA[<propertyGroup id="options" labelText="Options">
    <property id="groupId" labelText="Group" descriptionText="Specify which group the user will be added to." dataType="Custom" template="core_v2_groupLookup" enableCurrent="false" maxSelections="1" />
</propertyGroup>]]></configuration>
</automation>