G-Suite Adapter Actions
The RapidIdentity Rolling 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.
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 |
Example
result = addGoogleGroupAlias(sessionGoogle, "test-group@example.com", "test-group-alias@example.com")
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 |
Example
result = addGoogleGroupMember(sessionGoogle, "test-group@example.com", "joeuser@example.com", "MEMBER")
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 | 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 |
Example
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")
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 |
Note
result = addGoogleUserAlias(sessionGoogle, "joeuser@example.com", "joeuser@students.example.com")
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 |
Example
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 { }
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 | 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 |
Example
Global.GoogleDomain = "example.com" Global.GoogleOAuthCredentialName = "MyGoogleExtendedCredential" sessionGoogle = defineGoogleExtendedOAuthConnection(Global.GoogleDomain, Global.MyGoogleExtendedCredential, ["https://www.googleapis.com/auth/drive"], currentUser.id)
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 representing no timeout. |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
Global.GoogleDomain = "example.com" Global.GoogleOAuthCredentialName = "MyGoogleCredential" sessionGoogle = defineGoogleOAuthConnection(Global.GoogleDomain, Global.GoogleOAuthCredentialName)
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 |
Example
result = deleteGoogleCalendarResource(sessionGoogle, "projector-1")
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 |
Example
result = deleteGoogleCalendarTrustee(sessionGoogle, "jdoe@example.com", "jsmith@example.com")
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 |
Example
result = deleteGoogleCustomSchema(sessionGoogle, "my_schema")
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 |
Example
result = deleteGoogleGroup(sessionGoogle, "test-group@example.com")
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 |
Example
result = deleteGoogleGroupAlias(sessionGoogle, "test-group-alias@example.com")
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 |
Example
result = deleteGoogleGroupMember(sessionGoogle, "test-group@example.com", "joeuser@example.com")
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 | array of ids to remove from the Group |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
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)
Delete a batch of G-Suite Group record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the G-Suite connection definition |
ids* | text, expression, variable | array of the G-Suite User ids to delete |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
groups = createArray() appendArrayItem(groups, "test-group1@example.com") appendArrayItem(groups, "test-group2@example.com") appendArrayItem(groups, "test-group3@example.com") result = deleteGoogleGroups(sessionGoogle, groups)
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 |
Example
deleteGoogleOrgUnit(sessionGoogle, "jim-test/jim-test-sub")
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 |
Example
result = deleteGoogleSharedContact(sessionGoogle, "9f0e6b60fa1d04c")
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 |
Example
result = deleteGoogleSharedContactPhoto(sessionGoogle, "9f0e6b60fa1d04c")
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 |
Example
result = deleteGoogleUser(sessionGoogle, "joeuser@example.com")
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 |
Example
result = deleteGoogleUserAlias(sessionGoogle, "joeuser@students.example.com")
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 |
Example
result = deleteGoogleUserPhoto(sessionGoogle, "joeuser@example.com")
Delete batch of G-Suite Users by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the G-Suite connection definition |
ids* | expression, variable | array of the G-Suite User ids to delete |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
users = createArray() appendArrayItem(users, "joeuser@example.com") appendArrayItem(users, "freduser@example.com") appendArrayItem(users, "tomuser@example.com") result = deleteGoogleUsers(sessionGoogle, users)
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 delted |
Example
deleteGoogleUserSendAsAlias(sessionGoogle, "ddeers@idautodemo.com", "ccooper@idautodemo.com")
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 |
Example
resource = getGoogleCalendarResource(sessionGoogle, "testresource_1393275428627")
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 |
Example
resources = getGoogleCalendarResources(sessionGoogle)
Get a trustee of 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 |
Example
trustee = getGoogleCalendarTrustee(sessionGoogle, "jdoe@example.com", "example.com")
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 |
Example
trustees = getGoogleCalendarTrustees(sessionGoogle, "jdoe@example.com")
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 |
Example
my_schema = getGoogleCustomSchema(sessionGoogle, "my_schema")
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 |
Example
schemas = getGoogleCustomSchemas(sessionGoogle)
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 |
Example
groupIds = createArray() getGoogleGroup(groupIds, "group1@example.com") getGoogleGroup(groupIds, "group2@example.com") getGoogleGroup(groupIds, "group3@example.com") groups = getGoogleGroupsById(sessionGoogle, groupIds)
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 |
Example
groups = getGoogleGroups(sessionGoogle)
Get batch of G-Suite Group records by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the G-Suite connection definition |
ids* | text, expression, variable | 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 |
Example
group = getGoogleGroupsById(sessionGoogle, "testgroup_1332876583247@example.com")
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 |
Example
groupSettings = getGoogleGroupSettings(sessionGoogle, "testgroup_1332876583247@example.com")
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 |
Example
orgUnit = getGoogleOrgUnit(sessionGoogle, "jim-test")
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 |
Example
orgUnits = getGoogleOrgUnits(sessionGoogle)
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 |
Example
contact = getGoogleSharedContact(sessionGoogle, "7154f278887c0b81")
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 |
Example
photo = getGoogleSharedContactPhoto(sessionGoogle, "7154f278887c0b81")
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 |
Example
contacts = getGoogleSharedContacts(sessionGoogle)
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 |
Example
user = getGoogleUser(sessionGoogle, "jdoe@example.com")
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 |
Example
photo = getGoogleUserPhoto(sessionGoogle, "jdoe@example.com")
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 https://developers.google.com/admin-sdk/directory/v1/guides/search-users |
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 |
Example
users = getGoogleUsers(sessionGoogle)
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 |
Example
userIds = createArray() appendArrayElement(userIds, "user1@example.com") appendArrayElement(userIds, "user2@example.com") appendArrayElement(userIds, "user3@example.com") users = getGoogleUsersById(sessionGoogle, userIds)
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 |
Example
getGoogleUserSendAsAlias(sessionGoogle, "ddeers@idautodemo.com", "derrickdeers@idautodemo.com"
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 |
Example
sendAsAliases = getGoogleUserSendAsAliases(sessionGoogle, "jdoe")
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 |
Example
iterator = openGoogleCalendarResourceIterator(conn, true) forEach(next, iterator) { log("next:" + next); } close(iterator)
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 |
Example
iterator = openGoogleGroupIterator(conn, true) forEach(next, iterator) { log("next:" + next); } close(iterator)
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 |
Example
iterator = openGoogleOrgUnitIterator(conn, true) forEach(next, iterator) { log("next:" + next); } close(iterator)
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 |
Example
iterator = openGoogleSharedContactIterator(conn, true) forEach(next, iterator) { log("next:" + next); } close(iterator)
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 https://developers.google.com/admin-sdk/directory/v1/guides/search-users |
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 |
Example
iterator = openGoogleUserIterator(conn, true) forEach(next, iterator) { log("next:" + next); } close(iterator)
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 |
Example
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)
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 |
Example
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)
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 |
Example
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)
Create/Update a batch of G-Suite Group records.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the G-Suite connection definition |
records* | expression, variable | array of records to save |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
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)
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 |
Example
groupSettings = createRecord(false) setRecordFieldValue(groupSettings, "id", "test-group@example.com") setRecordFieldValue(groupSettings, "whoCanPostMessage", "ALL_MEMBERS_CAN_POST") result = saveGoogleGroupSettings(sessionGoogle, groupSettings)
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 |
Example
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)
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 |
Example
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)
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 |
Example
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)
Create/Update a batch of G-Suite User records.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the G-Suite connection definition |
records* | expression, variable | array of records to save |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
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 | array of records to save |
Example
{ 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 { }
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 |
Example
result = setGoogleCalendarTrustee(sessionGoogle, "jdoe@example.com", "jsmith@example.com", "read")
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 |
Example
photo = loadFileAsBytes("/photos/test.jpg") result = setGoogleSharedContactPhoto(sessionGoogle, "7154f278887c0b81", "image/jpeg", photo)
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 |
Example
photo = loadFileAsBytes("/photos/jdoe.jpg") result = setGoogleUserPhoto(sessionGoogle, "jdoe@example.com", "image/jpeg", photo)