> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pwnbook.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Calendar

> Sync Pwnbook engagement tasks and milestones to Google Calendar so your pentest schedule stays visible alongside the rest of your team's calendar.

## Overview

The Google Calendar integration lets you push Pwnbook task due dates and engagement milestones to a Google Calendar of your choice. Keep your pentest schedule visible without switching between tools.

<Note>Google Calendar sync is configured per user, not per organization. Each team member connects their own Google account independently.</Note>

## Prerequisites

* A Google account with Google Calendar
* A Pwnbook account

## Setup

<Steps>
  <Step title="Connect your Google account">
    1. Go to **User Settings → Integrations → Google Calendar**.
    2. Click **Connect Google Calendar**.
    3. A Google OAuth window opens. Sign in with the Google account you want to use.
    4. Review the requested permissions and click **Allow**.

    Pwnbook requests the following Google Calendar scope:

    | Scope                                      | Reason                                       |
    | ------------------------------------------ | -------------------------------------------- |
    | `https://www.googleapis.com/auth/calendar` | Read and write calendar events to sync tasks |

    You'll be redirected back to Pwnbook when authorization is complete.
  </Step>

  <Step title="Select a calendar">
    After connecting, choose which Google Calendar to sync to:

    1. In the Calendar settings, open the **Target Calendar** dropdown.
    2. Select a calendar from your Google account (personal, shared, or a team calendar).
    3. Click **Save**.

    <Tip>Create a dedicated calendar (e.g., "Pwnbook") to keep pentest events separate from your personal calendar.</Tip>
  </Step>
</Steps>

## What gets synced

| Item                      | Synced as                      | Notes                                   |
| ------------------------- | ------------------------------ | --------------------------------------- |
| Task due dates            | Calendar event on the due date | Title includes task name and engagement |
| Task assignments (to you) | Calendar event                 | Only your assigned tasks are synced     |

When a task's due date changes in Pwnbook, the corresponding calendar event is updated automatically.

## Managing synced events

Synced events appear in Google Calendar with a Pwnbook label. You can view them, but edits made directly in Google Calendar are not synced back to Pwnbook. Make changes in Pwnbook — they'll propagate to the calendar.

## Disconnecting

To disconnect your Google Calendar:

1. Go to **User Settings → Integrations → Google Calendar**.
2. Click **Disconnect**.

Pwnbook will stop syncing events. Existing calendar events created by Pwnbook remain in Google Calendar; delete them manually if needed.

To fully revoke Pwnbook's access to your Google account, visit [myaccount.google.com/permissions](https://myaccount.google.com/permissions) and remove the Pwnbook app.

## Self-hosted configuration

If you're running a self-hosted Pwnbook instance, a server admin needs to configure the Google OAuth app before users can connect their calendars.

Required environment variables:

| Variable               | Description                                                 |
| ---------------------- | ----------------------------------------------------------- |
| `GOOGLE_CLIENT_ID`     | OAuth 2.0 client ID from Google Cloud Console               |
| `GOOGLE_CLIENT_SECRET` | OAuth 2.0 client secret                                     |
| `GOOGLE_REDIRECT_URI`  | Must be set to `https://<your-domain>/auth/google/callback` |

To create the OAuth app:

1. Go to [Google Cloud Console](https://console.cloud.google.com).
2. Create a project (or use an existing one).
3. Enable the **Google Calendar API**.
4. Go to **APIs & Services → Credentials**.
5. Click **Create Credentials → OAuth 2.0 Client ID**.
6. Set the application type to **Web application**.
7. Add your redirect URI: `https://<your-domain>/auth/google/callback`.
8. Copy the Client ID and Client Secret into your `.env`.
