# Gmail

### How to connect Gmail to Polyfile

[Polyfile](https://my.polyfile.app/) integrates with [Gmail](https://mail.google.com) simply and securely using [OAuth 2.0 Authentication](https://en.wikipedia.org/wiki/OAuth#OAuth_2.0). Here is how you can do it.

{% hint style="success" %}
Polyfile **never** **deletes, moves,** or **affects** your files in **Gmail** in any way. We request only "**View**" access to allow you organize links to the files, use AI features like translations and audio/video transcriptions, and download and preview files in Polyfile.
{% endhint %}

1. Sign in to [Polyfile](https://my.polyfile.app/pb/sign-in) and click the "**+ Add a storage**" button in the left bottom corner.
2. Select [Gmail](https://mail.google.com) in the dialog and click the "**Connect**" button.
3. You will be redirected to Gmail sign in page. Choose account you want to connect and complete sign in.
4. Next, you will see "**Google hasn’t verified this app**" warning. We're working on verification. Click the "**Advanced**" button in the bottom left corner of the warning and the "**Go to polyfile.app (unsafe)**" link to proceed.
5. Lastly, you will get the "**polyfile.app wants additional access to your Google Account**" prompt that describes view access we're requesting. Click "Continue" to complete the integration.
6. It will take you back to [Polyfile](https://my.polyfile.app/space) and the [Gmail](https://mail.google.com) storage will appear in the left sidebar. It can take a minute or two to sync. All done!

### How to remove Gmail integration

1. In [Polyfile](https://my.polyfile.app): Find Gmail integration you want to remove in the Storages list (left sidebar) and right-click on it.
2. Click "Delete" button in the dropdown and confirm the operation in the popup.
3. The integration will be removed completely including all credentials and active sessions, all related files and resources, and all the references to your Gmail content in any [Virtual Storages](broken://pages/mTXmKMi8W5Cni97gPC4o) in [Polyfile](https://my.polyfile.app).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.polyfile.app/polyfile.app/integrations/gmail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
