G-SuiteCollaboration & Productivity Apps for Business
The tray.io G Suite connector allows you to manage your organisation in G Suite.
When using the Tray connector, the first thing you will have to do is to click "New Authentication" in the workflow builder:
Check every scope to allow Tray the correct permissions, then proceed to log in to your G Suite account.
Basic Operations List
There are a lot of operations available for this connector. Please see the full operations reference at the end of this guide.
In the following example we create a workflow that retrieves a list of users and assigns one of the users to a group.
To begin with, create a workflow with a Manual Trigger, then add a step from the G Suite connector with the operation set to
List Users. Set the 'Customer' parameter to "my_customer", this is a keyword that specifies your own account. This will output a list of users:
Next, we add a step from the G Suite connector with the operation set to
Get user, to retrieve one of the users from the list. Set the
User key to the ID of one of the users, by using a JsonPath as shown in the example:
Then, we add a step with the operation set to
List groups, enter the domain associated with our account, and in the output we retrieve a list of groups in our account:
We use the output of this step to find the ID of a group. We add another step with the operation set to
Add member to group, set the
Group key to the
id of one of the groups, and the
User key to the
primaryEmail of the user we returned in
Finally, we use the
Check group membership operation to verify the membership, setting the
Group key as above, and setting the
Member key to the
primaryEmail of the user, as in the
User key above. The operation should return
isMember: true in the output: