Google Adapter Actions Reference

RapidIdentity Platform Documentation

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US

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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
alias*text, expression, variablethe Alias to add
groupId*text, expression, variablethe id of the Group
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
groupId*text, expression, variablethe id of the group
memberId*text, expression, variablethe id of the object to add to the Group
rolechoice (MEMBER, MANAGER, OWNER), text, expression, variablethe role of the member (default: MEMBER)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
groupId*text, expression, variablethe id of the group
memberIds*text, expression, variablean array of ids to add to the Group
rolechoice (MEMBER, MANAGER, OWNER), text, expression, variablethe role of the members (default:MEMBER)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
alias*text, expression, variablethe Alias to add
userId*text, expression, variablethe id of the User
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
method*choice (GET, POST, PATCH, PUT, DELETE), text, expression, variablethe HTTP method to use
url*text, expression, variableThe URL of the Google API endpoint
headersexpression, variablea Record or Object containing additional HTTP header fields
dataexpression, variablethe data (PATCH/POST/PUT methods only)
contentTypechoice (application/json, application/atom+xml), text, expression, variablethe Content-Type of data (PATCH/POST/PUT methods only)
returnVariableexpression, variablename 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.

PropertyValueDescription
domain*text, expression, variablethe name of the G-Suite domain
credentialName*text, expression, variableOAuth2 credential for authentication to G-Suite
scopes*text, expression, variableAn array of Google OAuth2 scopes to enable
impersonateUserIdtext, expression, variableGoogle User to impersonate
optionsexpression, variableRecord or object holding additional options
returnVariableexpression, variablename 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.

PropertyValueDescription
domain*text, expression, variablethe name of the G-Suite domain
credentialName*text, expression, variableOAuth2 credential for authentication to G-Suite
optionsexpression, variableA 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.
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Calendar Resource to delete
returnVariableexpression, variablename of the variable to be assigned to the return value
result = deleteGoogleCalendarResource(sessionGoogle, "projector-1")

deleteGoogleCalendarTrustee

Delete a trustee from a G-Suite Calendar.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
calendar*text, expression, variablethe id (email) of the G-Suite Calendar
trustee*text, expression, variablethe id of the trustee
domaintext, expression, variablethe domain of the G-Suite Calendar (default: the domain specified in the connection)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Custom Schema to delete
returnVariableexpression, variablename of the variable to be assigned to the return value
result = deleteGoogleCustomSchema(sessionGoogle, "my_schema")

deleteGoogleGroup

Delete a G-Suite Group record by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Group to delete
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
alias*text, expression, variablethe Alias to delete
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
groupId*text, expression, variablethe id of the group
memberId*text, expression, variablethe id of the object to delete from the Group
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
groupId*text, expression, variablethe id of the group
memberIds*text, expression, variablean array of ids to remove from the Group
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
ids*text, expression, variablean array of the G-Suite User ids to delete
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite OrgUnit to delete
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Shared Contact to delete
domaintext, expression, variablethe domain of the G-Suite Shared Contact to delete (default: the domain specified in the connection)
returnVariableexpression, variablename of the variable to be assigned to the return value
result = deleteGoogleSharedContact(sessionGoogle, "9f0e6b60fa1d04c")

deleteGoogleSharedContactPhoto

Delete a G-Suite Shared Contact Photo by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite User
domaintext, expression, variablethe domain of the G-Suite Shared Contact (default: the domain specified in the connection)
returnVariableexpression, variablename of the variable to be assigned to the return value
result = deleteGoogleSharedContactPhoto(sessionGoogle, "9f0e6b60fa1d04c")

deleteGoogleUser

Delete a G-Suite User record by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite User to delete
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
alias*text, expression, variablethe Alias to delete
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite User
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
ids*expression, variablean array of the G-Suite User ids to delete
returnVariableexpression, variablename 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.

PropertyValueDescription
returnVariableexpression, variablename of the variable to be assigned to the return value
connection*expression, variablethe G-Suite connection definition
userid*text, expression, variableThe UserID with the assigned alias (email)
sendAsIdtext, expression, variableThe SendAs Alias address to be deleted
deleteGoogleUserSendAsAlias(sessionGoogle, "ddeers@idautodemo.com", "ccooper@idautodemo.com")

getGoogleCalendarResource

Get a G-Suite Calendar Resource record by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Calendar Resource to get
returnVariableexpression, variablename of the variable to be assigned to the return value
resource =
                getGoogleCalendarResource(sessionGoogle,
                "testresource_1393275428627")

getGoogleCalendarResources

Get G-Suite Calendar Resource records.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
returnVariableexpression, variablename of the variable to be assigned to the return value
resources = getGoogleCalendarResources(sessionGoogle)

getGoogleCalendarTrustee

Get a trustee of the G-Suite Calendar.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
calendar*text, expression, variablethe id (email) of the G-Suite Calendar
trustee*text, expression, variablethe id of the trustee
domaintext, expression, variablethe domain of the G-Suite Calendar (default: the domain specified in the connection)
returnVariableexpression, variablename of the variable to be assigned to the return value
trustee =
                getGoogleCalendarTrustee(sessionGoogle, "jdoe@example.com",
                "example.com")

getGoogleCalendarTrustees

Get G-Suite Calendar trustees.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
calendar*text, expression, variablethe id (email) of the G-Suite Calendar
domaintext, expression, variablethe domain of the G-Suite Calendar (default: the domain specified in the connection)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Custom Schema to get
returnVariableexpression, variablename of the variable to be assigned to the return value
my_schema = getGoogleCustomSchema(sessionGoogle, "my_schema")

getGoogleCustomSchemas

Get G-Suite Custom Schema records.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
returnVariableexpression, variablename of the variable to be assigned to the return value
schemas = getGoogleCustomSchemas(sessionGoogle)

getGoogleGroup

Get a G-Suite Group record by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Group to get
minimalboolean, expression, variabledon't get member, owner, and manager (default: false)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
domaintext, expression, variablethe domain of the groups to get (default: the domain specified in the connection; * = all domains associated with the account)
minimalboolean, expression, variabledon't get member, owner, and manager (default: false)
returnVariableexpression, variablename of the variable to be assigned to the return value
groups = getGoogleGroups(sessionGoogle)

getGoogleGroupsById

Get batch of G-Suite Group records by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
ids*text, expression, variablean array of the G-Suite User ids to get
minimalboolean, expression, variabledon't get member, owner, and manager (default: false)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Group
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite OrgUnit to get
returnVariableexpression, variablename of the variable to be assigned to the return value
orgUnit = getGoogleOrgUnit(sessionGoogle, "jim-test")

getGoogleOrgUnits

Get G-Suite OrgUnit records.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
parentIdtext, expression, variablethe id of the parent G-Suite OrgUnit to get the children of (default: all OrgUnits)
returnVariableexpression, variablename of the variable to be assigned to the return value
orgUnits = getGoogleOrgUnits(sessionGoogle)

getGoogleSharedContact

Get a G-Suite Shared Contact record by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Shared Contact to get
domaintext, expression, variablethe domain of the G-Suite Shared Contact to get (default: the domain specified in the connection)
returnVariableexpression, variablename of the variable to be assigned to the return value
contact = getGoogleSharedContact(sessionGoogle, "7154f278887c0b81")

getGoogleSharedContactPhoto

Get a G-Suite Shared Contact Photo by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite Shared Contact
domaintext, expression, variablethe domain of the G-Suite Shared Contact (default: the domain specified in the connection)
returnVariableexpression, variablename of the variable to be assigned to the return value
photo = getGoogleSharedContactPhoto(sessionGoogle, "7154f278887c0b81")

getGoogleSharedContacts

Get G-Suite Shared Contact records.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
domaintext, expression, variablethe domain of the G-Suite Shared Contacts to get (default: the domain specified in the connection)
returnVariableexpression, variablename of the variable to be assigned to the return value
contacts = getGoogleSharedContacts(sessionGoogle)

getGoogleUser

Get a G-Suite User record by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite User to get
minimalboolean, expression, variabledon't get user.emailLists, user.nicknames, and orgUnitPath (default: false)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite User
returnVariableexpression, variablename of the variable to be assigned to the return value
photo = getGoogleUserPhoto(sessionGoogle, "jdoe@example.com")

getGoogleUsers

Get G-Suite User records.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
parentIdtext, expression, variablethe id of the parent G-Suite OrgUnit to get the children of (default: all OrgUnits)
domaintext, expression, variablethe domain of the users to get (default: the domain specified in the connection; * = all domains associated with the account)
filtertext, expression, variablefilter to limit the users returned (default: none) For filter syntax, see Filtering and Sorting Search Results.
minimalboolean, expression, variabledon't get user.emailLists, user.nicknames, and orgUnitPath (default: false)
returnVariableexpression, variablename of the variable to be assigned to the return value
users = getGoogleUsers(sessionGoogle)

getGoogleUsersById

Get batch of G-Suite User records by Id.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
ids*expression, variablearray of the G-Suite User ids to get
minimalboolean, expression, variabledon't get user.emailLists, user.nicknames, and orgUnitPath (default: false)
returnVariableexpression, variablename 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.

PropertyValueDescription
returnVariableexpression, variablename of the variable to be assigned to the return value
connection*expression, variablethe G-Suite connection definition
userId*text, expression, variablethe id of the G-Suite User
sendAsId*text, expressionthe id of the SendAs alias
getGoogleUserSendAsAlias(sessionGoogle, "ddeers@idautodemo.com", "derrickdeers@idautodemo.com"

getGoogleUserSendAsAliases

Get the Send-as Aliases for a G-Suite User.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
userId*text, expression, variablethe id of the G-Suite User
returnVariableexpression, variablename of the variable to be assigned to the return value
sendAsAliases = getGoogleUserSendAsAliases(sessionGoogle, "jdoe")

openGoogleCalendarResourceIterator

Open G-Suite Calendar Resource Iterator.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
domaintext, expression, variablethe domain of the users to get (default: the domain specified in the connection; * = all domains associated with the account)
minimalboolean, expression, variabledon't get user.emailLists, user.nicknames, and orgUnitPath (default: false)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
parentIdtext, expression, variablethe id of the parent G-Suite OrgUnit to get the children of (default: all OrgUnits)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
domaintext, expression, variablethe domain of the G-Suite Shared Contacts to iterate (default: the domain specified in the connection)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
parentIdtext, expression, variablethe id of the parent G-Suite OrgUnit to get the children of (default: all OrgUnits)
domaintext, expression, variablethe domain of the users to get (default: the domain specified in the connection; * = all domains associated with the account)
filtertext, expression, variablefilter to limit the users returned (default: none) For filter syntax, see Filtering and Sorting Search Results
minimalboolean, expression, variabledon't get user.emailLists, user.nicknames, and orgUnitPath (default: false)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
record*expression, variablethe record to save
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
record*expression, variablethe record to save
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
record*expression, variablethe record to save
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
records*expression, variablean array of records to save
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
record*expression, variablethe record to save
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
record*expression, variablethe record to save
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
record*expression, variablethe record to save
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
record*expression, variablethe record to save
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
records*expression, variablean array of records to save
returnVariableexpression, variablename 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.

PropertyValueDescription
returnVariableexpression, variablename of the variable to be assigned to the return value
connection*expression, variablethe G-Suite connection definition
record*expression, variablean 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
calendar*text, expression, variablethe id (email) of the G-Suite Calendar
trustee*text, expression, variablethe id of the trustee
role*choice (none, freebusy, read, owner), text, expression, variablethe trustee role
domaintext, expression, variablethe domain of the G-Suite Calendar (default: the domain specified in the connection)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite User
type*text, expression, variablethe MIME media type of the photo
photo*expression, variablethe photo (as a byte array or Base64 encoded string)
domaintext, expression, variablethe domain of the G-Suite Shared Contact (default: the domain specified in the connection)
returnVariableexpression, variablename 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.

PropertyValueDescription
connection*expression, variablethe G-Suite connection definition
id*text, expression, variablethe id of the G-Suite User
type*text, expression, variablethe MIME media type of the photo
photo*expression, variablethe photo (as a byte array or Base64 encoded string)
returnVariableexpression, variablename of the variable to be assigned to the return value
photo =
                loadFileAsBytes("/photos/jdoe.jpg")
                result = setGoogleUserPhoto(sessionGoogle, "jdoe@example.com",
                "image/jpeg", photo)