Google Directory Insert
On this Page
Snap type: | Write | |||||||
---|---|---|---|---|---|---|---|---|
Description: | This Snap creates users, groups and org units in Google Directory.
| |||||||
Prerequisites: | [None] | |||||||
Support and limitations: | Works in Ultra Tasks. | |||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Google Directory Accounts for information on setting up this type of account.
| |||||||
Views: |
| |||||||
Settings | ||||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||
Resource | Required. The type of resource to be created. The options available include:
Default value: user | |||||||
Snap execution | Select one of the three modes in which the Snap executes. Available options are:
|
Supported Attributes by Resource
The following attributes must be passed through to the Google Delete Snap for the insert to process.
If the information provided for these attributes does not match the expected format (such as an email address with an incorrect domain), you may receive a "forbidden" error message. Verify your information is correct before continuing.
User
- name object with familyName and givenName - All required.
- password - Required.
- primaryEmail - Required.
See the API documentation referenced at the bottom of the page for the complete list of optional properties.
You can write and update custom fields in a user profile. You must define the custom schema on the domain prior to use.
Note:
- hashFunction is set to MD5.
- changePasswordAtNextLogin is set to false.
Orgunit
- name - Required.
- parentOrgUnitPath - Required.
Group
- email - Required.
- description - Optional.
- name - Optional.
Examples
Perform End-to-End Operations in Google Directory
The following example pipeline demonstrates the use of the Google Directory Insert, Update, Patch, Read, and Delete Snaps in a complete process, from record insertion to deletion at the endpoint.
Step 1: Configure the Mapper Snap with the primaryEmail, familyName, and givenName fields as follows:
Step 2: Configure the Google Directory Insert Snap to insert specific details of the user. On validation, the output displays the email ID, familyName, and givenName values, which indicate that these values are inserted in the Google Directory.
Step 3: Configure the Mapper Snap to pass the primaryEmail.
Step 4: Connect the Mapper Snap with the Copy Snap to create four copies of the output.
Step 5: Configure the Script Snaps at the output views of the Copy Snap to halt the pipeline for a specified time (100 seconds) to provide some delay between different operations such as update, patch, read, and delete.
Step 6: Perform the Update, Patch, Read, and Delete operations on the output documents from the Copy Snap.
First output view: Configure the Mapper Snap to get the primary email ID from the Copy Snap and update the familyName and givenName fields.
Configure the Google Directory Update Snap to update the values in the record for the specified primary email ID. On validation, the Snap displays the updated values.
Second output view: Configure the Mapper Snap to get the primary email ID and update the familyName, giveName, and recovery email ID fields.
Configure the Google Directory Update Snap with patch action to update the values in the record for the specified primary email ID. On validation, the Snap displays the updated values.
Third output view: Configure the Google Directory Read Snap to read the record with the primary email ID updated in the Google Directory Insert Snap. On validation, the inserted record displays in the output.
Fourth output view: Configure the Mapper Snap to get the primary email ID from the fourth output view of the Copy Snap and the email ID to the Google Directory Delete Snap.
Configure the Google Directory Delete Snap to delete the record for the passed primary email ID. On validation, the Snap displays the success message after deleting the record.
JSON for Inserting a User (Basic)
[ { "name": { "familyName": "Account", "givenName": "Google" }, "password": "test123it", "primaryEmail": "googleaccount@example.com" } ]
JSON for Inserting a Group
[ { "email": "googletestgroup@example.com" } ]
JSON for Inserting an Orgunit
[ { "customerID": "C04a4dvn5", "name": "TestOrgABeta", "parentOrgUnitPath": "/TestOrg/Subtest" } ]
Related content:
Refer to the following documentation for information on the input data:
Snap Pack History
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.