- 16 Aug 2022
- 23 Minutes to read
- Print
- DarkLight
G-Suite Adapter Actions
- Updated on 16 Aug 2022
- 23 Minutes to read
- Print
- DarkLight
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)
G-Suite Adapter Record Fields Reference
User Record Fields
Field | Read-Only | Description |
id | Y | the primaryEmail of the user to be updated (exclude on create) |
primaryEmail (required for creation) | N | The User's primary email address |
password (required for create) | N | Stores the password for the user account |
hashFunctionName | N | when setting a password, the hash function that has already been applied to the password. Legal values are “SHA-1”, “MD5”, and “CRYPT” or leave unspecified if password in clear text |
givenName (required for create) | N | the User's first name |
familyName (required for create) | N | the User's last name |
fullName | Y | the User's full name |
admin | N | indicates if the User has super administrator privileges |
suspended | N | indicates if the User is suspended |
suspensionReason | Y | indicates the reason the User was suspended: “ADMIN”, “UNDER13”, “WEB_LOGIN_REQUIRED”, “ABUSE” |
changePasswordAtNextLogin | N | indicates if the User is forced to change their password at the next login |
ipWhitelisted | N | indicates if the User's IP address is whitelisted |
includeInGlobalAddressList | N | indicates if the User's profile is visible in the G-Suite global address list when the contact sharing feature is enabled for the domain |
ims | N | the User's User IM Record Fields |
emails | N | the User's User Email Record Fields |
externalIds | N | the User's User External ID Record Fields |
relations | N | the User's User Relationship Record Fields |
addresses | N | the User's User Address Record Fields |
organizations | N | the User's User Organization Record Fields |
phones | N | the User's User Phone Number Record Fields |
etag | Y | eTag of the resource |
isDelegatedAdmin | Y | Indicates if the User is a delegated administrator |
lastLoginTime | Y | the last time the User logged into the User's account (Date object) |
creationTime | Y | the time the User User's account was created (Date object) |
deletionTime | Y | the time the User User's account was deleted (Date object) |
customerId | Y | the customer ID of the User |
isMailboxSetup | Y | indicates if the user's Google mailbox is created |
thumbnailPhotoUrl | Y | photo Url of the user |
uniqueid | Y | the unique ID for the user |
aliases | Y | the User's alias email addresses |
nonEditableAliases | Y | the user's non-editable alias email addresses - typically outside the account's primary domain or sub-domain |
memberOf | Y | all groups for which a user or group has a membership |
customSchemas | N | the User's Custom Schema Record Fields |
userName | N | the user name of the User (DEPRECATED - use primaryEmail) |
user.emailLists | Y | list of Groups the User belongs to (DEPRECATED - use memberOf) |
user.nicknames | Y | the Nicknames of the User (DEPRECATED - use aliases) |
Group Record Fields
Field | Read-Only | Description |
id | Y | the id of the Group to be updated (exclude on create) |
groupId (required for creating) | N | the email address of the Group |
groupName (required for creating) | N | the name of the Group |
description | Y | the description of the Group |
member | Y | list of members of the Group |
etag | Y | eTag of the resource |
whoCanAdd | N | the members that can add members to the Group. Can be set to all members, managers, or none |
whoCanJoin | N | the members that can join the Group. Can be set to members in any domain, by request, or invitation |
whoCanViewGroup | N | the members that can view the Group. Can be set to members in the domain, managers, members, or anyone |
whoCanLeaveGroup | N | the members that can leave the Group. Can be set to all members, managers, or none |
whoCanContactOwner | N | the members that can contact the Group owner. can be set to all in the domain, members, managers, or anyone |
Alias Record Fields
Field | Read-Only | Description |
id | Y | the id of the Alias (exclude on create) |
alias | Y | the Alias email address |
primaryEmail | Y | The aliased User's/Group's primary email address |
etag | Y | eTag of the resource |
OrgUnit Record Fields
Field | Read-Only | Description |
id | Y | the id of the OrgUnit (exclude on create) |
name | N | the simple name of the OrgUnit |
parentOrgUnitPath | N | the full path name of the OrgUnit parent |
description | N | the description of the OrgUnit |
blockInheritance | N | block policy inheritance from OrgUnits higher in the OrgUnit tree (“true”/“false”) |
orgUnitPath | Y | the full pathname of the OrgUnit |
etag | Y | eTag of the resource |
Shared Contact Record Fields
Field | Read-Only | Description |
id | Y | the id of the Contact (exclude on create) |
namePrefix | N | An honorific prefix of the Contact, e.g. 'Mr' or 'Mrs' |
givenName | N | given name of the Contact |
additionalName | N | the additional name of the Contact, eg. middle name |
familyName | N | the family name of the Contact |
nameSuffix | N | Honorific suffix of the Contact, e.g. 'Jr' or 'MD' |
fullName | N | Unstructured representation of the name of the Contact |
content | N | notes about the Contact |
N | Contact Email Record Fields | |
im | N | Contact IM Record Fields |
organization | N | Contact Organization Record Fields |
phoneNumber | N | Contact Phone Number Record Fields |
structuredPostalAddress | N | Contact Postal Address Record Fields |
where | N | place associated with the Contact |
extendedProperty | N | Contact Extended Property Record Fields |
title | Y | the title of the Contact |
updated | Y | the date the Contact record was last updated |
Calendar Resource Record Fields
Field | Read-Only | Description |
id | Y | the id of the Resource (exclude on create) |
resourceId (required for creating) | N | the unique name of the Resource |
resourceName | N | the name of the Resource |
resourceDescription | N | the description of the Resource |
resourceEmail | Y | the email address of the Resource (and the id of the associated Calendar) |
resourceType | N | the type of the Resource |
resourceCommonName | N | the display name of the Resource (DEPRECATED - use resourceName) |
User Send-As Alias Record Fields
Field | Read-Only | Description |
userId | N | the id of the User the Send-As Alias will apply to |
name | N | the name associated with the Send-As Alias |
address | N | the email address of the Send-As Alias |
replyTo | N | optional reply-to address of Send-As Alias |
makeDefault | N | the make the Send-As Alias the default for the User |
isDefault | Y | indicates whether or not the Send-As Alias is currently the default for the User |
verified | Y | indicates if the ownership of the email address's domain has been verified. This field must be true (verified) before the Send-As alias address can work. |
Custom Schema Definition Record Fields
Field | Read-Only | Description |
id | Y | The id of the schema |
schemaName | N | The name of the custom schema |
schemaId | Y | The unique identifier of the schema |
fields | N | 1 or more Custom Field Definition Records |
Custom Field Definition Record Fields
Field | Read-Only | Description |
fieldName | N | The name of the custom field |
fieldId | Y | The unique identifier of the field |
fieldType | N | The type of the field:
|
indexed | N | true if the field is to be indexed (default: true) |
multiValued | N | true if the field is multivalued (default: false) |
readAccessType | N | Who can view the values of this field:
|
numericIndexingSpec | N | Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting this field allows a range of queries to be supported. |
numericIndexingSpec.maxValue | N | The maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but the search may not be as performant. |
numericIndexingSpec.maxValue | N | The minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but the search may not be as performant. |
Contact Email Record Fields
Field | Description |
address (required) | the email address |
displayName | the display name of the entity the email address belongs to |
label | name for the email address, e.g. Work, Personal, Preferred, etc. |
rel | the type of email: one of home, work, or other |
primary | boolean indicating this is the primary email address |
Contact IM Record Fields
Field | Description |
address (required) | the instant messaging address |
label | name for the email address, e.g. Work, Personal, Preferred, etc. |
rel | the type of IM: one of home, NetMeeting, work, or other |
protocol | the IM protocol: one of AIM, MSN, YAHOO, SKYPE, QQ, GOOGLE_TALK, ICQ, JABBER |
primary | boolean indicating this is the primary im address |
Contact Organization Record Fields
Field | Description |
orgDepartment | the department within the organization |
orgName | the name of the organization |
orgSymbol | the symbol of the organization |
orgTitle | the title of the person of the organization |
orgJobDescription | the job description of the person within the organization |
label | label for the organization, e.g. Work, Volunteer, etc. |
rel | the type of organization: one of work, or other |
primary | boolean indicating this is the primary organization for the person |
where | a place associated with the organization, e.g. office location |
Contact Phone Number Record Fields
Field | Description |
number (required) | the phone number |
label | name for the phone number, e.g. Work, Personal, Preferred, etc. |
rel | the type of phone number: one of assistant, callback, car, company_main, fax, home, home_fax, isdn, main, mobile, pager, radio, telex, tty_tdd, work, work_fax, work_mobile, work_pager, other_fax, or other |
uri | URI of phone number for VOIP access |
primary | boolean indicating this is the primary phone number |
Contact Postal Address Record Fields
Field | Description |
street | the street address |
pobox | the post office box |
neighborhood | the neighborhood |
city | the city |
region | state, province, etc |
postcode | postal code |
country | name of the country |
countryCode | |
formattedAddress | the full, unstructured postal address |
label | name of the address, e.g. Work, Personal, Preferred, etc. |
rel | the type of address: one of work, home, or other |
primary | boolean indicating this is the primary phone number |
Contact Extended Property Record Fields
Field | Description |
name | the name of the extended property |
realm | the realm of the extended property |
value | the value of the extended property |
User Email Record Fields
Field | Description |
address | the email address |
primary | indicates if this is the user's primary email |
type | the type of the email account: “home”, “work”, “other”, “custom” |
customType | if the value of type is custom, this field contains the custom type string |
User IM Record Fields
Field | Description |
im | the user's IM network ID |
primary | indicates this is the user's primary IM |
protocol | the IM protocol: “aim”, “gtalk”, “icq”, “jabber”, “msn”, “net_meeting”, “qq”, “skype”, “yahoo”, “custom_protocol” |
customProtocol | if the protocol value is custom_protocol, this field holds the custom protocol's string |
type | the type of the IM account: “home”, “work”, “other”, “custom” |
customType | if the IM type is custom, this field holds the custom type string |
User Organization Record Fields
Field | Description |
costCenter | the cost center of the organization |
department | the department within the organization |
description | the description of the organization |
domain | the domain the organization belongs to |
location | the physical location of the organization |
name | the name of the organization |
primary | indicates if this is the user's primary organization |
symbol | text string symbol of the organization |
title | the user's title within the organization |
type | the type of organization: “unknown”, “school”, “work”, “domain_only”, “custom” |
customType | if the value of type is custom, this field contains the custom type |
User Phone Number Record Fields
Field | Description |
value | a human-readable phone number |
primary | indicates if this is the user's primary phone number |
type | the type of phone number: “assistant”, “callback”, “car”, “company_main”, “grand_central”, “home”, “home_fax”, “isdn”, “main”, “mobile”, “other”, “other_fax”, “pager”, “radio”, “telex”, “tty_tdd”, “work”, “work_fax”, “work_mobile”, “work_pager”, “custom” |
customType | if the value of type is custom, this field contains the custom type |
User Address Record Fields
Field | Description |
country | the country |
countryCode | the country code |
extendedAddress | for extended addresses, such as an address that includes a sub-region |
formatted | a full and unstructured postal address |
locality | the town or city of the address |
poBox | the post office box |
postalCode | the ZIP or postal code |
primary | indicates if this is the user's primary address |
region | the abbreviated province or state |
sourceIsStructured | indicates if the user-supplied address was formatted |
streetAddress | the street address |
type | the address type: “home”, “other”, “work”, “custom” |
customType | if the address type is custom, this field contains the custom value |
User External ID Record Fields
Field | Description |
value | the value of the ID |
type | the type of the ID. Allowed values are: “account”, “custom”, “customer”, “network”, “organization” |
customType | if the external ID type is custom, this field holds the custom type |
User Relationship Record Fields
Field | Description |
value | the name of the person the user is related to |
type | the type of relation: “assistant”, “brother”, “child”, “domestic_partner”, “father”, “friend”, “manager”, “mother”, “parent”, “partner”, “referred_by”, “relative”, “sister”, “spouse”, “custom” |
customType | if the value of type is custom, this field contains the custom type |
User Custom Schema Record Fields
Field | Description |
<schema_name> | A record containing the custom schema fields for the schema with the name schema_name |
<schema_name>.<field_name> | For single-valued fields, the value of the field For multi-valued fields, 0 or more User Custom Schema Multivalued Value Record |
User Custom Schema Multivalued Value Record Fields
Field | Description |
value | The value of the field item |
type | Optional type of the value
|
customType | The name of the custom type if type=custom |