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

# Installation

> Connect Google Docs to Rootly for automated document generation, retrospective creation, and incident note management with OAuth and service account support.

Connect Google Docs to Rootly so workflows can automatically generate retrospectives, runbooks, and other incident documents from your templates. Setup takes 2 minutes via OAuth or about 10 minutes via a service account.

## Before You Begin

<Warning>
  You must be an **Admin or Owner** in Rootly to install integrations.

  * **OAuth:** Requires a Google account with access to Google Drive
  * **Service Account:** Requires Google Workspace admin access and a Google Cloud project
</Warning>

Choose your setup method based on your environment:

<CardGroup cols={2}>
  <Card title="OAuth (Personal Account)" icon="user">
    **Best for:** Testing, evaluation, or personal use

    Connects your personal Google account. If that account loses access or the person leaves, the integration breaks.
  </Card>

  <Card title="Service Account (Recommended)" icon="building">
    **Best for:** Teams and production environments

    Uses a dedicated service account that isn't tied to any individual. More resilient and easier to manage at scale.
  </Card>
</CardGroup>

## Quick Setup (OAuth)

OAuth connects your personal Google account in about 2 minutes.

<Steps>
  <Step title="In Rootly, go to Configuration → Integrations">
    Use the search bar to find **Google Docs** among the available integrations.

    <Frame>
      <img alt="Rootly sidebar showing Configuration and Integrations menu" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-1.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=88e4b8721d3b597f59fd065aec0b3e97" width="513" height="377" data-path="images/integrations/google-docs/installation/image-1.png" />
    </Frame>

    <Frame>
      <img alt="Integrations page with Google Docs search result" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-2.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=798cc5180560dbc84e8d31bc129f9827" width="525" height="262" data-path="images/integrations/google-docs/installation/image-2.png" />
    </Frame>
  </Step>

  <Step title="Click Setup and choose OAuth">
    Select the OAuth connection method, then choose which Google account to connect.

    <Frame>
      <img alt="Google Docs setup button" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-3.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=557c6d3e6bebd859c1592605ac41af60" width="925" height="484" data-path="images/integrations/google-docs/installation/image-3.png" />
    </Frame>
  </Step>

  <Step title="Approve the requested permissions">
    Google will ask Rootly to access Google Drive and Docs on your behalf. Approve to complete the connection.

    You'll be redirected back to Rootly once the authorization completes.
  </Step>
</Steps>

<Tip>
  Google Docs is now connected. You can create templates and wire them up in workflows — head to the [Workflows](/integrations/google-docs/workflows) page to get started.
</Tip>

## Production Setup (Service Account)

A service account keeps the integration running independent of any individual's Google account. This setup involves creating the account in Google Cloud, uploading its credentials to Rootly, and granting it domain-wide delegation.

<Steps>
  <Step title="In Google Cloud Console, go to IAM & Admin → Service Accounts">
    If you don't have a project yet, create one first. You'll create the service account inside an existing project.

    <Frame>
      <img alt="Google Cloud IAM Service Accounts page" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-6.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=d5dfb0b3876dcf76075c3ef8c7b65aa0" width="1324" height="629" data-path="images/integrations/google-docs/installation/image-6.png" />
    </Frame>
  </Step>

  <Step title="Create a new Service Account">
    Click **Create Service Account**, fill in a name and description, then click **Done**.

    <Frame>
      <img alt="Create service account form in Google Cloud" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-7.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=b5a6e94866b4d07ff5e1f317c5291a89" width="1365" height="632" data-path="images/integrations/google-docs/installation/image-7.png" />
    </Frame>

    <Frame>
      <img alt="Service account created confirmation" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-8.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=c2040d98ec6279e13661ee769395573f" width="1365" height="629" data-path="images/integrations/google-docs/installation/image-8.png" />
    </Frame>

    After creating the account, click on its email address to open its details.

    <Frame>
      <img alt="Service account list — click email to open details" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-9.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=2c479071067f5604924fe0969dea5fa7" width="589" height="554" data-path="images/integrations/google-docs/installation/image-9.png" />
    </Frame>
  </Step>

  <Step title="Create a JSON key for the service account">
    Go to the **Keys** tab → **Add Key** → **Create new key**. Select **JSON** as the key type and click **Create**.

    <Frame>
      <img alt="Keys tab in service account details" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-10.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=63699a90a36734d2c8568a6dad042a8e" width="1363" height="631" data-path="images/integrations/google-docs/installation/image-10.png" />
    </Frame>

    <Frame>
      <img alt="Create new JSON key dialog" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-11.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=6f82e43e50fd393775e46f6480588e30" width="1365" height="633" data-path="images/integrations/google-docs/installation/image-11.png" />
    </Frame>

    A `.json` file will download automatically — keep it safe, you'll need it in the next step.
  </Step>

  <Step title="Upload the JSON key to Rootly">
    In Rootly, go to **Configuration → Integrations → Google Docs → Setup**. Choose the **Service Account** connection method and upload the JSON file you just downloaded.

    <Frame>
      <img alt="Upload JSON key to Rootly setup screen" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-12.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=83fb240810f603f57e2c83e32c7646dc" width="1365" height="632" data-path="images/integrations/google-docs/installation/image-12.png" />
    </Frame>

    You should see a success message confirming the integration is active.
  </Step>

  <Step title="Enable Domain-wide Delegation">
    The service account needs domain-wide delegation to create documents on behalf of users in your Google Workspace.

    In [Google Admin Console](https://admin.google.com), go to **Security → API Controls → Domain-wide Delegation** and click **Add new**. Enter your service account's Client ID (found in GCP Console under the service account details), then add these OAuth scopes:

    ```
    https://www.googleapis.com/auth/drive.file
    https://www.googleapis.com/auth/drive.appdata
    https://www.googleapis.com/auth/documents
    ```

    Click **Authorize**.

    <Frame>
      <img alt="Domain-wide delegation setup in Google Admin Console" src="https://mintcdn.com/rootly/_PUAvUAOiRXFH78z/images/integrations/google-docs/installation/image-13.png?fit=max&auto=format&n=_PUAvUAOiRXFH78z&q=85&s=c72c304c787a329651153078600e0269" width="894" height="514" data-path="images/integrations/google-docs/installation/image-13.png" />
    </Frame>
  </Step>
</Steps>

<Warning>
  Without domain-wide delegation, the service account can't create documents on behalf of users. If you skip this step, document creation will fail silently in workflows.
</Warning>

## Verify the Connection

Once connected, confirm the integration is working before building templates and workflows.

<Tabs>
  <Tab title="OAuth">
    1. The integration should show **Connected** status with your Google account email
    2. Try creating a test document in Google Drive to confirm access is working
  </Tab>

  <Tab title="Service Account">
    1. The integration should show **Connected** status with the service account email
    2. Confirm domain-wide delegation is active — changes can take up to 15 minutes to propagate
    3. Run a test workflow (see the [Workflows](/integrations/google-docs/workflows) page) to validate end-to-end
  </Tab>
</Tabs>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication failed" icon="circle-xmark">
    **OAuth:** Try signing in again using a different browser or an incognito window.

    **Service Account:** Verify the JSON key file is valid and hasn't been corrupted or truncated.
  </Accordion>

  <Accordion title="403 Forbidden when creating documents" icon="ban">
    This is almost always a domain-wide delegation issue. Check that:

    * The Client ID in Google Admin matches your service account exactly
    * All three OAuth scopes are entered as shown (no extra spaces or typos)
    * You've waited at least 15 minutes for Google to propagate the changes
  </Accordion>

  <Accordion title="Integration shows connected but documents aren't created" icon="triangle-exclamation">
    **OAuth:** Re-authenticate to refresh your access token.

    **Service Account:** Confirm the service account has **Editor** access to the target folder in Google Drive.
  </Accordion>
</AccordionGroup>

***

## Uninstall

To remove the Google Docs integration, go to **Configuration → Integrations**, find **Google Docs**, and click the **Connected** button to reveal the disconnect option.

<Frame>
  <img src="https://mintcdn.com/rootly/QMD-dNqeYW4BA9dg/images/integrations/common/uninstall-connected.png?fit=max&auto=format&n=QMD-dNqeYW4BA9dg&q=85&s=dbb790e2576c8969bba96bc26c95265f" alt="Click the Connected button to reveal the Disconnect option" width="319" height="188" data-path="images/integrations/common/uninstall-connected.png" />
</Frame>

<Warning>
  Disconnecting stops Rootly from creating new documents. Documents already generated by Rootly are not affected.
</Warning>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Templates & Workflows" icon="diagram-project" href="/integrations/google-docs/workflows">
    Set up a Liquid template and wire it to a workflow to auto-generate documents on incident events
  </Card>

  <Card title="View Examples" icon="book" href="/integrations/google-docs/workflows#template-examples">
    Browse ready-to-use template examples for retrospectives and executive summaries
  </Card>
</CardGroup>
