Google Apps Calendar Unshare Version 1

This handler uses the Google API library to unshare a Google Calendar that has been previously shared. The handler first uses the inputted refresh token and client id/secret to authorize the client (instructions on how to get these values can be found below). A call is then made to exchange the Calendar Name for a unique Calendar Id. Then another call will be made to Google to find the ACL Id of the calendar (the rule that says who the calendar can be shared to) so that it can then be deleted. Any errors that occur during the posting process will be caught and re-raised by this handler.

  • In order to use this handler, the account specified by the task info values needs to enable Calendar API in admin account.

How to retrieve the Client Id, Client Secret, and Refresh Token

To enable the Calendar API and get Client Id and Client Secret:

  1. Navigate to the 'Google Developers Console' 
                
                  2. Click on the Create Project button (or if you have an existing project that you wish to keep using, click on the project name.) 
                
                  3. Go to the APIs page and turn on the Calendar service 
                
                  4. Go to the Credientials page and Create a new Client Id 
                
                      * Select 'Installed Application' for the application type 
                
                      * Select 'Other' for the Installed Application Type 
                

To retrieve the Refresh Token for the account you want to post to

  1. Put this url into your browser, while substiuting [:client_id] for the client id of your application 
                
                  * https://accounts.google.com/o/oauth2/auth?client_id=[:client_id]&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/calendar&response_type=code&access_type=offline 
                
                
                
                  2. Choose or add the account that you wish to connect the handler with 
                
                  3. Click accept to give your application permission to modify the calendar 
                
                  4. Copy and paste the success code that appears on the page 
                
                  5. Send a post request to get the refresh token 
                
                      * This can either done with Curl or with a browser extension like Advanced REST Client in Chrome (A sample curl call is below) 
                

POST URL = https://accounts.google.com/o/oauth2/token POST Parameters: code=[:code]&clientid=[:clientid]&clientsecret=[:clientsecret]&redirecturi=urn:ietf:wg:oauth:2.0:oob&granttype=authorization_code

Sample Curl Call: curl -- data "code=[:code]&clientid=[:clientid]&clientsecret=[:clientsecret]&redirecturi=urn:ietf:wg:oauth:2.0:oob&granttype=authorization_code" https://accounts.google.com/o/oauth2/token

Parameters

Name Description
Calendar Name The name of the calendar that will be unshared.
Unshare Location The location that the calendar will be unshared from. If the calendar is currently public, the location is 'default'.

Sample Configuration

Name Description
Calendar Name Example Calendar
Unshare Location

Results

This handler does not return any results.

Changelog

GoogleAppsCalendarUnshare_V1 (2014-06-10)

  • Initial version. See README for details.


Related Handlers

Google Apps Calendar Create
This handler creates a new event in Google Calendar
Google Apps Calendar Event Create
This handler creates a new Google Calendar event.
Google Apps Calendar Share
This handler shares a Google Calendar
Google Apps Group Add Owners
This handler sets a list of existing users to be managers of the specified group.
Google Apps Group Add Users
This handler adds a list of existing users to the specified group.
Google Apps Group Create
This handler creates a new Google Apps group.
Google Apps Group Delete
This handler deletes an existing Google Apps group.
Google Apps Group Remove Users
This handler removes a list of users from the specified group.
Google Apps User Create
This handler creates a new user
Google Apps User Delete
This handler deletes a user from the domain database
Google Apps User Restore
This handler restores a user in the domain database
Google Apps User Suspend
This handler suspends a user from the domain database

Looking for a workflow engine?

Learn more about the Kinetic Data Enterprise Workflow Platform Check it out Caret right circle