With this integration, you will be able to create a Google account for your new hire.
{ "form": [], "oauth": { "refresh": { "url": "https://oauth2.googleapis.com/token", "data": { "client_id": "{{ CLIENT_ID }}", "grant_type": "refresh_token", "client_secret": "{{ CLIENT_SECRET }}", "refresh_token": "{{ oauth.refresh_token }}" }, "method": "POST" }, "access_token": { "url": "https://oauth2.googleapis.com/token?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}&grant_type=authorization_code&redirect_uri={{redirect_url}}", "method": "POST" }, "authenticate_url": "https://accounts.google.com/o/oauth2/v2/auth?client_id={{CLIENT_ID}}&redirect_uri={{redirect_url}}&response_type=code&scope=https://www.googleapis.com/auth/admin.directory.user&access_type=offline&prompt=consent" }, "exists": { "url": "https://admin.googleapis.com/admin/directory/v1/users/{{email}}", "method": "GET", "expected": "{{ email }}", "fail_when_4xx_response_code": false }, "execute": [ { "url": "https://www.googleapis.com/admin/directory/v1/users", "data": { "name": { "givenName": "{{ first_name }}", "familyName": "{{ last_name }}" }, "password": "{{ PASSWORD }}", "primaryEmail": "{{ email }}", "changePasswordAtNextLogin": true }, "method": "POST" } ], "headers": { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer {{oauth.access_token}}" }, "extra_user_info": [ { "id": "PERSONAL_EMAIL", "name": "Personal email address", "description": "Add the email address from the user (not business) to send google email to." } ], "initial_data_form": [ { "id": "CLIENT_ID", "name": "The Google client id", "description": "You can find it here: " }, { "id": "CLIENT_SECRET", "name": "The Google client secret", "description": "You can find it here: " }, { "id": "PASSWORD", "name": "generate", "description": "Used to create the new hire's password for new Google account." } ], "post_execute_notification": [ { "to": "{{ PERSONAL_EMAIL }}", "type": "email", "message": "username: {{ email }}, password: {{PASSWORD}}", "subject": "Here are your Google login credentials!" } ] }
https://www.googleapis.com/auth/admin.directory.user
. Under 'Authorized domains', fill in your own site url and the url of the ChiefOnboarding instance.We just set up our authentication screen for you to sign in to. Up next, we need to create credentials that we can put into the ChiefOnboarding instance, so we can actually show that authentication dialog.
Client-ID
and Client-secret
that you need to fill in on your ChiefOnboarding instance.