Calendar Notifier provides event handler and actions triggered by Google Calendar.
- Events
- Actions
- HTTP Action
- Cloud Pub/Sub Action
- Cloud Tasks Action
- Create GCP Project
- Create GCP Service Account
- Role assignment is not required if it does not use pubsub action.
- https://cloud.google.com/iam/docs/creating-managing-service-accounts
- Share Google Calendar with service account
- Use service account e-mail address. (e.g.
my-service-account@project-id.iam.gserviceaccount.com
) - https://support.google.com/calendar/answer/37082
- Use service account e-mail address. (e.g.
- Set
SERVICE_ACCOUNT
environment. Use base64 encoded GCP Service Account JSON.echo "SERVICE_ACCOUNT=$(base64 < service_account.json)" > .env
- Edit
config.sample.yml
and save asconfig.yml
. - Set
CONFIG
environment. Use base64 encoded config.yml.echo "CONFIG=$(base64 < config.yml)" > .env
- Run
docker-compose up
- Run
docker build -t calendar-notifier .
- Run
docker run -e SERVICE_ACCOUNT=$(base64 < service_account.json) -e CONFIG=$(base64 < config.yml) calendar-notifier
If use Cloud Tasks Action, service account should have the following permissions.
cloudtasks.tasks.list
cloudtasks.tasks.create
cloudtasks.tasks.delete
iam.serviceAccounts.actAs
For example, give your service account the following roles.
roles/cloudtasks.viewer
roles/cloudtasks.enqueuer
roles/cloudtasks.taskDeleter
roles/iam.serviceAccountUser
- https://cloud.google.com/tasks/docs/reference-access-control
- https://cloud.google.com/iam/docs/understanding-service-accounts?hl=ja#sa_common
If use Cloud Pub/Sub Action, service account should have the following permissions.
pubsub.topics.publish
For example, give your service account the following roles.
roles/pubsub.publisher