> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/risk-management/threat-model-coverage/personal-account-sharing/google-playbooks-for-personal-account-sharing.md).

# Google playbooks for personal account sharing

To mitigate the risk associated with personal account sharing in Google Drive, you can define automated workflows for these use cases:&#x20;

* [Remove sharing with personal email](#remove-sharing-with-personal-email)
* [Remediate suspended employee's personal email access to Google Drive](#remediate-suspended-employees-personal-email-access-to-google-drive)

## Remove sharing with personal email

When someone shares a file from Google Drive with their personal email account (as verified by the HRIS app), both the actor and manager are notified, and the external collaborator set with personal emails is automatically removed.

1. In Workflows, select **Playbooks**.

2. Filter the playbooks according to the Google Drive app, and select the **Remove sharing with personal email** playbook.

3. Give an action name.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FF5195lXU2Njm8uiuY3nz%2FPlaybook%20personal%20Google.png?alt=media&amp;token=1df777a6-e7ad-4c7e-9ede-a5bce0fc473a" alt=""><figcaption></figcaption></figure>

4. Under the **Change user access** event, define the relevant conditions:

   * The `Has added collaborators` condition is `true`.
   * The `Get actor` condition is from your organization's list of [trusted domains](/docontrol-user-guide/saas-data-monitoring/inventory/inventory-domains.md#trusted-domains).
   * The `Added collaborators` condition has at least one from your organization's `private email domain list`. To define your private email domain list, see [lexical lists](/docontrol-user-guide/system-management/settings/lexical-lists.md).
   * Add any relevant conditions.

5. In the **Get user metadata** step:
   * Select the HRIS app from which to retrieve user data, such as HiBob.
   * Verify that the user email contains the `Get actor email` macro.

6. Customize a **Conditional** step to check if the collaborator has the personal email of the actor, according to records in your organization's HR app:
   * If **False**, end the workflow.
   * If **True**, customize the **Notify by email** step to notify the actor who shared the file, and explain that sharing permissions will be removed:\
     `Hi, You shared a file named <file name>  with <target email>  which was identified as your personal email.`

     `The file sharing will be removed immediately, as this sharing violates our organizational policy.`

7. Customize the **Notify by email** step to notify the actor's manager that the actor shared a file with their personal email: \
   `Your team member, <actor name>, shared a file named <file name> with <target name>. This email was identified as the actor's personal email.`

   `The file sharing will be removed immediately, as this sharing violates our organizational policy.`

   `An email was sent to the actor notifying them that the file sharing will be removed.`

8. Customize the **Array filter** step, to filter personal emails from the set of collaborators.

9. Under the **Remove collaborator** action:
   * Make sure the `Get asset ID` and `personal emails from collaborators` macros are selected.
   * Specify how to continue the workflow in case of an error.

The external collaborators are automatically removed from the Google Drive asset.

## Remediate suspended employee's personal email access to Google Drive

When a employee is suspended from Google Workspace, DoControl automatically runs an API to remediate any Google files that were shared with the employee's personal email account. If the remediation action doesn't complete successfully, the Security team is notified, and the remediation is run again after a defined time interval.

1. In Workflows, select **Playbooks**.

2. Filter the playbooks according to the Google Workspace app, and select the **Remediate suspended employee's personal email access to Google Drive** playbook.

3. Give an action name.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FCmQ0uICjwvPC1K5JBPrN%2Fremediate%20suspended%20employee%20GD%20playbook.png?alt=media&amp;token=461db6ca-1499-4dcb-a145-486e2bb17440" alt=""><figcaption></figcaption></figure>

4. Customize the **Suspend user** Google Workspace event, for when an employee has been suspended.

5. Customize the **Get user metadata** step to retrieve the suspended employee's personal email from the HRIS app, such as HiBob or Workday.

6. Customize the **DoControl API** step to run a bulk remediation to remove the suspended employee's personal email from all Google assets shared with him.

7. Customize the **Conditional** step that the remediation assessment process started:
   * If true, end the workflow with success.
   * If false, customize the **Notify by email** step to email the Security team that the remediation could not be completed, and will be run again in 60 minutes. \
     Customize the **Wait** step with the length of time to wait before running the remediation again.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docontrol.io/docontrol-user-guide/risk-management/threat-model-coverage/personal-account-sharing/google-playbooks-for-personal-account-sharing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
