myuhe / org-gcal.el

Org sync with Google Calendar
450 stars 113 forks source link
  1. Go to [[https://console.developers.google.com/project][Google Developers Console]]

  2. Create a project (with any name)

  3. Click on the project

  4. Click on APIs & Auth then Credentials

  5. Click on Create New Client ID with Application type /Installed application/, Installed application type /Other/

  6. Click on Create Client ID

  7. Record the Client ID and Client secret for setup.

  8. Under the same APIs & Auth menu section, select APIs

  9. Scroll down to Calendar API. Click the Status button to enable calendar API access to the app you created in steps 5 & 6.

    Go to [[https://www.google.com/calendar/render][Google setting page]] to check the calendar ID.

  10. Go to [[https://www.google.com/calendar/render][Google setting page]] and click the gear-shaped settings icon in the upper right, then select "Settings" from the drop down list.

  11. Select the "Calendars" tab, which will display a list of your calendars.

  12. Select the calendar you would like to synchronize with. This will take you to the "Calendar Details" page for that calendar. Near the end is a section titled "Calendar Address". Following the XML, ICAL, and HTML tags, you will see your Calendar ID.

  13. Copy the Calendar ID for use in the settings below, where you will use it as the first element in the org-gcal-file-alist for associating calendars with specific org files. You can associate different calendars with different org files, so repeat this for each calendar you want to use.

** Setting example

+begin_src elisp

(require 'org-gcal) (setq org-gcal-client-id "your-id-foo.apps.googleusercontent.com" org-gcal-client-secret "your-secret" org-gcal-file-alist '(("your-mail@gmail.com" . "~/schedule.org") ("another-mail@gmail.com" . "~/task.org")))

+end_src