The RapidIdentity Release versions include updated nomenclature of the Google actions to align with Google's renaming of Google Apps to G-Suite.
The adapter is now referred to as G-Suite and the actions all have "Apps" removed from their names. RapidIdentity includes a mapping from the older G-Suite action names to the newer G-Suite action names.
addGoogleGroupAlias
Add a G-Suite Alias to a Group.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| alias* | text, expression, variable | the Alias to add |
| groupId* | text, expression, variable | the id of the Group |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
addGoogleGroupAlias(sessionGoogle, "test-group@example.com",
"test-group-alias@example.com")addGoogleGroupMember
Add a member to a G-Suite Group.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| groupId* | text, expression, variable | the id of the group |
| memberId* | text, expression, variable | the id of the object to add to the Group |
| role | choice (MEMBER, MANAGER, OWNER), text, expression, variable | the role of the member (default: MEMBER) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
addGoogleGroupMember(sessionGoogle, "test-group@example.com",
"joeuser@example.com", "MEMBER")addGoogleGroupMembers
Add a batch of members to a G-Suite Group.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| groupId* | text, expression, variable | the id of the group |
| memberIds* | text, expression, variable | an array of ids to add to the Group |
| role | choice (MEMBER, MANAGER, OWNER), text, expression, variable | the role of the members (default:MEMBER) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
members = createArray()
appendArrayItem(members, "joeuser@example.com")
appendArrayItem(members, "freduser@example.com")
appendArrayItem(members, "tomuser@example.com")
result = addGoogleGroupMembers(sessionGoogle, "test-group@example.com",
members, "MEMBER")addGoogleUserAlias
Add a G-Suite Alias to a User.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| alias* | text, expression, variable | the Alias to add |
| userId* | text, expression, variable | the id of the User |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
addGoogleUserAlias(sessionGoogle, "joeuser@example.com",
"joeuser@students.example.com")callGoogleAPI
Call an arbitrary Google API endpoint.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| method* | choice (GET, POST, PATCH, PUT, DELETE), text, expression, variable | the HTTP method to use |
| url* | text, expression, variable | The URL of the Google API endpoint |
| headers | expression, variable | a Record or Object containing additional HTTP header fields |
| data | expression, variable | the data (PATCH/POST/PUT methods only) |
| contentType | choice (application/json, application/atom+xml), text, expression, variable | the Content-Type of data (PATCH/POST/PUT methods only) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
Global.GoogleDomain = "example.com"
Global.GoogleOAuthCredentialName = "MyGoogleExtendedCredential"
sessionGoogle = defineGoogleExtendedOAuthConnection(Global.GoogleDomain,
Global.MyGoogleExtendedCredential,
["https://www.googleapis.com/auth/drive"], currentUser.id)
# upload test string as a file to google drive
response = callGoogleAPI(sessionGoogle, "POST",
"https://www.googleapis.com/upload/drive/v3/files?uploadType=media",
null, "This is a test", "text/plain");
# if successfully uploaded, rename from auto-generated name to
one of our choice
if(response.statusCode == 200 && response.data && response.data.id)
{
fileId = response.data.id
response = callGoogleAPI(sessionGoogle, "PATCH",
"https://www.googleapis.com/drive/v3/files/" + fileId, null,
{name: "text.txt"}, "application/json");
} else {
}defineGoogleExtendedOAuthConnection
Define an Extended OAuth2 connection to G-Suite.
| Property | Value | Description |
| domain* | text, expression, variable | the name of the G-Suite domain |
| credentialName* | text, expression, variable | OAuth2 credential for authentication to G-Suite |
| scopes* | text, expression, variable | An array of Google OAuth2 scopes to enable |
| impersonateUserId | text, expression, variable | Google User to impersonate |
| options | expression, variable | Record or object holding additional options |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
Global.GoogleDomain = "example.com"
Global.GoogleOAuthCredentialName = "MyGoogleExtendedCredential"
sessionGoogle = defineGoogleExtendedOAuthConnection(Global.GoogleDomain,
Global.MyGoogleExtendedCredential,
["https://www.googleapis.com/auth/drive"], currentUser.id)defineGoogleOAuthConnection
Define an OAuth2 connection to G-Suite.
| Property | Value | Description |
| domain* | text, expression, variable | the name of the G-Suite domain |
| credentialName* | text, expression, variable | OAuth2 credential for authentication to G-Suite |
| options | expression, variable | A record or JavaScript object with a field for each additional option. Currently, defined fields are connectTimeout and socketTime which require a numeric value from 1 to 2147483647 (0x7FFFFFFF) that represents the number of milliseconds for the timeout, and 0 represents no timeout. |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
Global.GoogleDomain = "example.com"
Global.GoogleOAuthCredentialName = "MyGoogleCredential"
sessionGoogle = defineGoogleOAuthConnection(Global.GoogleDomain,
Global.GoogleOAuthCredentialName)deleteGoogleCalendarResource
Delete a G-Suite Calendar Resource record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Calendar Resource to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleCalendarResource(sessionGoogle, "projector-1")deleteGoogleCalendarTrustee
Delete a trustee from a G-Suite Calendar.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| calendar* | text, expression, variable | the id (email) of the G-Suite Calendar |
| trustee* | text, expression, variable | the id of the trustee |
| domain | text, expression, variable | the domain of the G-Suite Calendar (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleCalendarTrustee(sessionGoogle, "jdoe@example.com",
"jsmith@example.com")deleteGoogleCustomSchema
Delete a G-Suite Custom Schema record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Custom Schema to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleCustomSchema(sessionGoogle, "my_schema")deleteGoogleGroup
Delete a G-Suite Group record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Group to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result = deleteGoogleGroup(sessionGoogle,
"test-group@example.com")deleteGoogleGroupAlias
Delete a G-Suite Alias from a Group.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| alias* | text, expression, variable | the Alias to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleGroupAlias(sessionGoogle, "test-group-alias@example.com")deleteGoogleGroupMember
Delete a member from a G-Suite Group.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| groupId* | text, expression, variable | the id of the group |
| memberId* | text, expression, variable | the id of the object to delete from the Group |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleGroupMember(sessionGoogle, "test-group@example.com",
"joeuser@example.com")deleteGoogleGroupMembers
Delete a batch of members from a G-Suite Group.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| groupId* | text, expression, variable | the id of the group |
| memberIds* | text, expression, variable | an array of ids to remove from the Group |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
members = createArray()
appendArrayItem(members, "joeuser@example.com")
appendArrayItem(members, "freduser@example.com")
appendArrayItem(members, "tomuser@example.com")
result = deleteGoogleGroupMembers(sessionGoogle, "test-group@example.com",
members)deleteGoogleGroups
Delete a batch of G-Suite Group records by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| ids* | text, expression, variable | an array of the G-Suite User ids to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
groups = createArray()
appendArrayItem(groups, "test-group1@example.com")
appendArrayItem(groups, "test-group2@example.com")
appendArrayItem(groups, "test-group3@example.com")
result = deleteGoogleGroups(sessionGoogle, groups)deleteGoogleOrgUnit
Delete a G-Suite OrgUnit record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite OrgUnit to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
deleteGoogleOrgUnit(sessionGoogle, "jim-test/jim-test-sub")deleteGoogleSharedContact
Delete a G-Suite Shared Contact record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Shared Contact to delete |
| domain | text, expression, variable | the domain of the G-Suite Shared Contact to delete (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleSharedContact(sessionGoogle, "9f0e6b60fa1d04c")deleteGoogleSharedContactPhoto
Delete a G-Suite Shared Contact Photo by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite User |
| domain | text, expression, variable | the domain of the G-Suite Shared Contact (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleSharedContactPhoto(sessionGoogle, "9f0e6b60fa1d04c")deleteGoogleUser
Delete a G-Suite User record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite User to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleUser(sessionGoogle, "joeuser@example.com")deleteGoogleUserAlias
Delete a G-Suite Alias from a User.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| alias* | text, expression, variable | the Alias to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleUserAlias(sessionGoogle, "joeuser@students.example.com")deleteGoogleUserPhoto
Delete a G-Suite User Photo by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite User |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
deleteGoogleUserPhoto(sessionGoogle, "joeuser@example.com")deleteGoogleUsers
Delete a batch of G-Suite Users by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| ids* | expression, variable | an array of the G-Suite User ids to delete |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
users = createArray()
appendArrayItem(users, "joeuser@example.com")
appendArrayItem(users, "freduser@example.com")
appendArrayItem(users, "tomuser@example.com")
result = deleteGoogleUsers(sessionGoogle, users)deleteGoogleUserSendAsAlias
Delete a Send-as Alias for a Google Apps user.
| Property | Value | Description |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
| connection* | expression, variable | the G-Suite connection definition |
| userid* | text, expression, variable | The UserID with the assigned alias (email) |
| sendAsId | text, expression, variable | The SendAs Alias address to be deleted |
deleteGoogleUserSendAsAlias(sessionGoogle, "ddeers@idautodemo.com",
"ccooper@idautodemo.com")getGoogleCalendarResource
Get a G-Suite Calendar Resource record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Calendar Resource to get |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
resource =
getGoogleCalendarResource(sessionGoogle,
"testresource_1393275428627")getGoogleCalendarResources
Get G-Suite Calendar Resource records.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
resources =
getGoogleCalendarResources(sessionGoogle)getGoogleCalendarTrustee
Get a trustee of the G-Suite Calendar.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| calendar* | text, expression, variable | the id (email) of the G-Suite Calendar |
| trustee* | text, expression, variable | the id of the trustee |
| domain | text, expression, variable | the domain of the G-Suite Calendar (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
trustee =
getGoogleCalendarTrustee(sessionGoogle, "jdoe@example.com",
"example.com")getGoogleCalendarTrustees
Get G-Suite Calendar trustees.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| calendar* | text, expression, variable | the id (email) of the G-Suite Calendar |
| domain | text, expression, variable | the domain of the G-Suite Calendar (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
trustees =
getGoogleCalendarTrustees(sessionGoogle, "jdoe@example.com")getGoogleCustomSchema
Get a G-Suite CustomSchema record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Custom Schema to get |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
my_schema =
getGoogleCustomSchema(sessionGoogle, "my_schema")getGoogleCustomSchemas
Get G-Suite Custom Schema records.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
schemas =
getGoogleCustomSchemas(sessionGoogle)getGoogleGroup
Get a G-Suite Group record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Group to get |
| minimal | boolean, expression, variable | don't get member, owner, and manager (default: false) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
groupIds = createArray()
getGoogleGroup(groupIds, "group1@example.com")
getGoogleGroup(groupIds, "group2@example.com")
getGoogleGroup(groupIds, "group3@example.com")
groups = getGoogleGroupsById(sessionGoogle, groupIds)getGoogleGroups
Get G-Suite Group records.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| domain | text, expression, variable | the domain of the groups to get (default: the domain specified in the connection; * = all domains associated with the account) |
| minimal | boolean, expression, variable | don't get member, owner, and manager (default: false) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
groups =
getGoogleGroups(sessionGoogle)getGoogleGroupsById
Get batch of G-Suite Group records by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| ids* | text, expression, variable | an array of the G-Suite User ids to get |
| minimal | boolean, expression, variable | don't get member, owner, and manager (default: false) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
group =
getGoogleGroupsById(sessionGoogle,
"testgroup_1332876583247@example.com")getGoogleGroupSettings
Get a G-Suite Group Settings record.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Group |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
groupSettings =
getGoogleGroupSettings(sessionGoogle,
"testgroup_1332876583247@example.com")getGoogleOrgUnit
Get a G-Suite OrgUnit record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite OrgUnit to get |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
orgUnit =
getGoogleOrgUnit(sessionGoogle, "jim-test")getGoogleOrgUnits
Get G-Suite OrgUnit records.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| parentId | text, expression, variable | the id of the parent G-Suite OrgUnit to get the children of (default: all OrgUnits) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
orgUnits =
getGoogleOrgUnits(sessionGoogle)getGoogleSharedContact
Get a G-Suite Shared Contact record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Shared Contact to get |
| domain | text, expression, variable | the domain of the G-Suite Shared Contact to get (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
contact =
getGoogleSharedContact(sessionGoogle, "7154f278887c0b81")getGoogleSharedContactPhoto
Get a G-Suite Shared Contact Photo by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite Shared Contact |
| domain | text, expression, variable | the domain of the G-Suite Shared Contact (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
photo =
getGoogleSharedContactPhoto(sessionGoogle, "7154f278887c0b81")getGoogleSharedContacts
Get G-Suite Shared Contact records.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| domain | text, expression, variable | the domain of the G-Suite Shared Contacts to get (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
contacts =
getGoogleSharedContacts(sessionGoogle)getGoogleUser
Get a G-Suite User record by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite User to get |
| minimal | boolean, expression, variable | don't get user.emailLists, user.nicknames, and orgUnitPath (default: false) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
user =
getGoogleUser(sessionGoogle, "jdoe@example.com")getGoogleUserPhoto
Get a G-Suite User Photo by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite User |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
photo =
getGoogleUserPhoto(sessionGoogle, "jdoe@example.com")getGoogleUsers
Get G-Suite User records.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| parentId | text, expression, variable | the id of the parent G-Suite OrgUnit to get the children of (default: all OrgUnits) |
| domain | text, expression, variable | the domain of the users to get (default: the domain specified in the connection; * = all domains associated with the account) |
| filter | text, expression, variable | filter to limit the users returned (default: none) For filter syntax, see Filtering and Sorting Search Results. |
| minimal | boolean, expression, variable | don't get user.emailLists, user.nicknames, and orgUnitPath (default: false) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
users =
getGoogleUsers(sessionGoogle)getGoogleUsersById
Get batch of G-Suite User records by Id.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| ids* | expression, variable | array of the G-Suite User ids to get |
| minimal | boolean, expression, variable | don't get user.emailLists, user.nicknames, and orgUnitPath (default: false) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
userIds = createArray()
appendArrayElement(userIds, "user1@example.com")
appendArrayElement(userIds, "user2@example.com")
appendArrayElement(userIds, "user3@example.com")
users = getGoogleUsersById(sessionGoogle, userIds)getGoogleUserSendAsAlias
Get the specific Send-As Alias for a Google User.
| Property | Value | Description |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
| connection* | expression, variable | the G-Suite connection definition |
| userId* | text, expression, variable | the id of the G-Suite User |
| sendAsId* | text, expression | the id of the SendAs alias |
getGoogleUserSendAsAlias(sessionGoogle, "ddeers@idautodemo.com",
"derrickdeers@idautodemo.com"getGoogleUserSendAsAliases
Get the Send-as Aliases for a G-Suite User.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| userId* | text, expression, variable | the id of the G-Suite User |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
sendAsAliases = getGoogleUserSendAsAliases(sessionGoogle, "jdoe")openGoogleCalendarResourceIterator
Open G-Suite Calendar Resource Iterator.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
iterator =
openGoogleCalendarResourceIterator(conn, true)
forEach(next, iterator) {
log("next:" + next);
}
close(iterator)openGoogleGroupIterator
Open G-Suite Group Iterator.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| domain | text, expression, variable | the domain of the users to get (default: the domain specified in the connection; * = all domains associated with the account) |
| minimal | boolean, expression, variable | don't get user.emailLists, user.nicknames, and orgUnitPath (default: false) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
iterator = openGoogleGroupIterator(conn,
true)
forEach(next, iterator) {
log("next:" + next);
}
close(iterator)openGoogleOrgUnitIterator
Open G-Suite OrgUnit Iterator.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| parentId | text, expression, variable | the id of the parent G-Suite OrgUnit to get the children of (default: all OrgUnits) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
iterator =
openGoogleOrgUnitIterator(conn, true)
forEach(next, iterator) {
log("next:" + next);
}
close(iterator)openGoogleSharedContactIterator
Open G-Suite Shared Contact Iterator.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| domain | text, expression, variable | the domain of the G-Suite Shared Contacts to iterate (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
iterator =
openGoogleSharedContactIterator(conn, true)
forEach(next, iterator) {
log("next:" + next);
}
close(iterator)openGoogleUserIterator
Open G-Suite User Iterator.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| parentId | text, expression, variable | the id of the parent G-Suite OrgUnit to get the children of (default: all OrgUnits) |
| domain | text, expression, variable | the domain of the users to get (default: the domain specified in the connection; * = all domains associated with the account) |
| filter | text, expression, variable | filter to limit the users returned (default: none) For filter syntax, see Filtering and Sorting Search Results |
| minimal | boolean, expression, variable | don't get user.emailLists, user.nicknames, and orgUnitPath (default: false) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
iterator = openGoogleUserIterator(conn,
true)
forEach(next, iterator) {
log("next:" + next);
}
close(iterator)saveGoogleCalendarResource
Update a G-Suite Calendar Resource record.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| record* | expression, variable | the record to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
resource = createRecord(false)
setRecordFieldValue(resource, "resourceId", "projector-1")
setRecordFieldValue(resource, "resourceDescription",
"Dell model 1021 projector - Sales")
setRecordFieldValue(resource, "resourceName", "projector-sales")
result = saveGoogleCalendarResource(sessionGoogle, resource)saveGoogleCustomSchema
Create/Update a G-Suite Custom Schema record.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| record* | expression, variable | the record to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
schemaTemplate = createRecordFromObject({
schemaName: "my_schema",
fields: [
{
fieldName: "isManager",
fieldType: "BOOL",
indexed: false,
multiValued: false,
readAccessType: "ALL_DOMAIN_USERS"
},
{
fieldName: "directReports",
fieldType: "EMAIL",
indexed: true,
multiValued: true,
readAccessType: "ALL_DOMAIN_USERS"
},
]
})
my_schema = saveGoogleCustomSchema(conn, schemaTemplate)saveGoogleGroup
Create/Update a G-Suite Group record.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| record* | expression, variable | the record to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
group = createRecord(false)
setRecordFieldValue(group, "groupId", "test-group@example.com")
setRecordFieldValue(group, "groupName", "test-group")
setRecordFieldValue(group, "description", "A test group")
result = saveGoogleGroup(sessionGoogle, group)saveGoogleGroups
Create/Update a batch of G-Suite Group records.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| records* | expression, variable | an array of records to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
groups = createArray()
i = 0
while(i++ < 5) {
group = createRecord(false)
setRecordFieldValue(group, "groupId", "test-group-" + i + "@example.com")
setRecordFieldValue(group, "groupName", "test-group-" + i);
setRecordFieldValue(group, "description", "A test group")
appendArrayItem(groups, group)
}
result = saveGoogleGroups(sessionGoogle, groups)saveGoogleGroupSettings
Update a G-Suite Group Settings record.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| record* | expression, variable | the record to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
groupSettings = createRecord(false)
setRecordFieldValue(groupSettings, "id", "test-group@example.com")
setRecordFieldValue(groupSettings, "whoCanPostMessage",
"ALL_MEMBERS_CAN_POST")
result = saveGoogleGroupSettings(sessionGoogle, groupSettings)saveGoogleOrgUnit
Create/Update a G-Suite OrgUnit record.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| record* | expression, variable | the record to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
orgUnit = createRecord(true)
addRecordFieldValue(orgUnit, "name", "jim-test", false)
addRecordFieldValue(orgUnit, "description", "Jim's test org unit", false)
addRecordFieldValue(orgUnit, "parentOrgUnitPath", "/", false)
saveGoogleOrgUnit(sessionGoogle, orgUnit)
orgUnit2 = createRecord(false)
addRecordFieldValue(orgUnit2, "name", "jim-test-sub", false)
addRecordFieldValue(orgUnit2, "parentOrgUnitPath", "jim-test", false)
addRecordFieldValue(orgUnit2, "description", "Jim's test sub ou", false)
addRecordFieldValue(orgUnit2, "blockInheritance", "true", false)
saveGoogleOrgUnit(sessionGoogle, orgUnit2)saveGoogleSharedContact
Update a G-Suite Shared Contact record.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| record* | expression, variable | the record to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
phone = createRecord(true)
addRecordFieldValue(phone, "number", "2812200021", false)
addRecordFieldValue(phone, "rel", "work", false)
addRecordFieldValue(phone, "primary", "true", false)
contact = createRecord(false)
addRecordFieldValue(contact, "fullName", "Identity Automation", false)
addRecordFieldValue(contact, "phoneNumber", phone, false)
result = saveGoogleSharedContact(sessionGoogle, contact)saveGoogleUser
Create/Update a G-Suite User record.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| record* | expression, variable | the record to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
user = createRecord(true)
addRecordFieldValue(user, "primaryEmail", "joeuser@example.com", false)
addRecordFieldValue(user, "password", "Ch@ng3m3", false)
addRecordFieldValue(user, "familyName", "User", false)
addRecordFieldValue(user, "givenName", "Joe", false)
addRecordFieldValue(user, "orgUnitPath", "jim-test", false)
phone = createRecord(true)
addRecordFieldValue(phone, "number", "2812200021", false)
addRecordFieldValue(phone, "rel", "work", false)
addRecordFieldValue(phone, "primary", "true", false)
addRecordFieldValue(user, "phones", phone)
result = saveGoogleUser(sessionGoogle, user)saveGoogleUsers
Create/Update a batch of G-Suite User records.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| records* | expression, variable | an array of records to save |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
users = createArray()
i = 0
while(i++ < 5) {
user = createRecord(true)
addRecordFieldValue(user, "primaryEmail", "joeuser_" + i +
"@example.com", false)
addRecordFieldValue(user, "password", "Ch@ng3m3", false)
addRecordFieldValue(user, "familyName", "User", false)
addRecordFieldValue(user, "givenName", "Joe", false)
addRecordFieldValue(user, "orgUnitPath", "jim-test", false)
appendArrayItem(users, group)
}
result = saveGoogleUsers(sessionGoogle, users)saveGoogleUserSendAsAlias
Add a Send-as Alias for a Google User.
| Property | Value | Description |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
| connection* | expression, variable | the G-Suite connection definition |
| record* | expression, variable | an array of records to save |
{
doesContain = stringContains(exists['emails'], recordAD['mail'], true)
if (!doesContain) {
# Add Google Apps Alias
{
result = addGoogleUserAlias(sessionGoogle, recordAD['mail'], record['userName'])
}
if (result) {
{
alias = createRecord()
setRecordFieldValue(alias, "userId", record['userName'])
setRecordFieldValue(alias, "address", recordAD['mail'])
setRecordFieldValue(alias, "name", recordAD['displayName'])
setRecordFieldValue(alias, "replyTo", recordAD['mail'])
setRecordFieldValue(alias, "makeDefault", true)
result = saveGoogleUserSendAsAlias(sessionGoogle, alias)
}
} else {
}
} else {
}setGoogleCalendarTrustee
Add/Update a trustee of a G-Suite Calendar.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| calendar* | text, expression, variable | the id (email) of the G-Suite Calendar |
| trustee* | text, expression, variable | the id of the trustee |
| role* | choice (none, freebusy, read, owner), text, expression, variable | the trustee role |
| domain | text, expression, variable | the domain of the G-Suite Calendar (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
result =
setGoogleCalendarTrustee(sessionGoogle, "jdoe@example.com",
"jsmith@example.com", "read")setGoogleSharedContactPhoto
Update a G-Suite Shared Contact Photo.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite User |
| type* | text, expression, variable | the MIME media type of the photo |
| photo* | expression, variable | the photo (as a byte array or Base64 encoded string) |
| domain | text, expression, variable | the domain of the G-Suite Shared Contact (default: the domain specified in the connection) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
photo =
loadFileAsBytes("/photos/test.jpg")
result = setGoogleSharedContactPhoto(sessionGoogle, "7154f278887c0b81",
"image/jpeg", photo)setGoogleUserPhoto
Update a G-Suite User Photo.
| Property | Value | Description |
| connection* | expression, variable | the G-Suite connection definition |
| id* | text, expression, variable | the id of the G-Suite User |
| type* | text, expression, variable | the MIME media type of the photo |
| photo* | expression, variable | the photo (as a byte array or Base64 encoded string) |
| returnVariable | expression, variable | name of the variable to be assigned to the return value |
photo =
loadFileAsBytes("/photos/jdoe.jpg")
result = setGoogleUserPhoto(sessionGoogle, "jdoe@example.com",
"image/jpeg", photo)