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

# Connector for Google Drive

> The Connector for Google Drive allows users to download and sync receipts in a structured hierarchy directly to their Google Drive.

Watch this video to view a demo of connecting, configuring the Google Drive connector and syncing receipts [here.](https://www.youtube.com/watch?v=opr2rOquyFw)

## Connect PEX and Google Drive

To connect your PEX and Google Drive from the PEX Marketplace follow these steps:

<Steps>
  <Step>
    Log in to [http://dashboard.pexcard.com/](http://dashboard.pexcard.com/?utm_source=support)
  </Step>

  <Step>
    Navigate to [Apps > Available](https://dashboard.pexcard.com/apps/available?utm_source=support)
  </Step>

  <Step>
    Locate **Connector for Google Drive**.
  </Step>

  <Step>
    Click **More info** > **Install** > **Launch**.
  </Step>
</Steps>

<Note>
  **Note:**

  To install the connector, you need to enable the following permissions: *Edit business settings & apps*, *Manage cardholder*, *View card transactions*. You can enable them in [My Profile -> Permissions](https://dashboard.pexcard.com/account/permissions?utm_source=support).
</Note>

Once the app has launched for the first time click "Connect" on the right side panel to begin.

<Steps>
  <Step>
    You will be directed to "Sign In" or select an already signed in Google account.
  </Step>

  <Step>
    Click "Allow" to give PEX permission to access your Google Drive for the following data fields:

    * [Permission to get information about the connected user](https://developers.google.com/people/api/rest/v1/people/get#authorization-scopes):
    * `userinfo.email`      See your primary Google Account email address.
    * `userinfo.profile`  See your personal info, including any personal info you've made publicly available.
    * [Permissions for Google Drive](https://developers.google.com/drive/api/v3/about-auth):
    * `drive.readonly`      Allows read-only access to file metadata and file content. PEX requires this in order to [LIST the shared drives](https://developers.google.com/drive/api/v3/reference/drives/list#auth).
    * `drive.file`             Per-file access to files created or opened by the app.
  </Step>
</Steps>

## Configure settings

<Steps>
  <Step>
    Select the preferred parameters for each field:

    * Purchase Receipts - Choose Approved or All transactions.
      * Start Date - The first date to sync.
      * End Date - The final date to sync.
      * Shared Drive - If you have multiple shared drives available you can select them here, or leave it blank to sync your personal "My Drive".
      * Path Template - Click the arrow on the right side to choose between different file hierarchy options.
      * Automatic Sync - Enable if you want to sync purchase attachments on an automatic schedule (every hour).

    <Frame>
      <img src="https://mintcdn.com/pextest/4XKZ8SDv0u7DUjZE/images/administrator-guide/connector-for-google-drive/image-1.png?fit=max&auto=format&n=4XKZ8SDv0u7DUjZE&q=85&s=ce8729500713e8b4f224b2716f8a326f" alt="" width="1246" height="912" data-path="images/administrator-guide/connector-for-google-drive/image-1.png" />
    </Frame>
  </Step>

  <Step>
    Click "Save Options" to save your sync settings and then click "Sync Attachments" to begin downloading data to your Google Drive.

    <Frame>
      <img src="https://mintcdn.com/pextest/4XKZ8SDv0u7DUjZE/images/administrator-guide/connector-for-google-drive/image-2.png?fit=max&auto=format&n=4XKZ8SDv0u7DUjZE&q=85&s=7db46e0c4a388e5e91982678cd641126" alt="" width="1240" height="897" data-path="images/administrator-guide/connector-for-google-drive/image-2.png" />
    </Frame>

    If there are no Start and End dates entered when you click "Sync Attachments", the connector will default to the 1st day of the prior month. When automatic sync is **on**, the connector auto optimizes its dates to the same 1st day of the prior month.
  </Step>
</Steps>

You can disconnect from your Google Drive if you don't want to sync receipts to Google Drive anymore.

<Frame>
  <img src="https://mintcdn.com/pextest/4XKZ8SDv0u7DUjZE/images/administrator-guide/connector-for-google-drive/image-3.png?fit=max&auto=format&n=4XKZ8SDv0u7DUjZE&q=85&s=8c45c1491c3348150f99241d5c8cb896" alt="" width="613" height="375" data-path="images/administrator-guide/connector-for-google-drive/image-3.png" />
</Frame>

## FAQ

<AccordionGroup>
  <Accordion title="How often does it sync if you don't enable the auto sync to sync hourly?">
    It will sync every time you click the “Sync Attachments” button.

    <Frame>
      <img src="https://mintcdn.com/pextest/4XKZ8SDv0u7DUjZE/images/administrator-guide/connector-for-google-drive/image-4.png?fit=max&auto=format&n=4XKZ8SDv0u7DUjZE&q=85&s=7f9f644c97fb9e39439495f09444af09" alt="" width="318" height="72" data-path="images/administrator-guide/connector-for-google-drive/image-4.png" />
    </Frame>
  </Accordion>

  <Accordion title="Are there any limitations for the start date?">
    The Start Date is max 1 year in the past.
  </Accordion>

  <Accordion title="Does the sync end date have any limitations if an Admin wants to sync back only, say, a specific period of time in the past?">
    The only limitation is up to 1 year in the past. The user could do however June 15 - December 15 2024 if they wanted to (assuming today is June 15, 2025).
  </Accordion>

  <Accordion title="Where does the Path Template come from?">
    We’ve incorporated feedback to come up with the most common types of configurations. Let us know if you have another preferred way to store receipts and we can update accordingly.
  </Accordion>

  <Accordion title="How do I re-download receipts?">
    Previously synced receipts will not re-download if the file is already present in the PEX Receipts file hierarchy or if it has a sync note from being previously downloaded.

    <Frame>
      <img src="https://mintcdn.com/pextest/4XKZ8SDv0u7DUjZE/images/administrator-guide/connector-for-google-drive/image-5.png?fit=max&auto=format&n=4XKZ8SDv0u7DUjZE&q=85&s=cd1eb126beefe6c527def7dffcaa484e" alt="image.png" width="871" height="534" data-path="images/administrator-guide/connector-for-google-drive/image-5.png" />
    </Frame>

    In order to re-download receipts, delete the sync note (shown above) on the relevant transactions and click "Sync Attachments" or wait for automatic sync to sync the receipts.
  </Accordion>

  <Accordion title="How does PEX share data with Google Drive?">
    The sync between PEX and your Google Drive account is required to send transaction receipt images into your personal My Drive or Shared Drive folders. All transaction receipt images created by PEX will begin with a PEX\Receipts prefix or a custom file location created by you or your company's Admin. The Connector for Google Drive will only read and write data to the PEX\Receipts or the custom file location. Additionally, the Connector for Google Drive requires read-only access to the full drive to populate the "Shared Drive" drop down list. For more information on the PEX Privacy Policy, please navigate [here](http://www.pexcard.com/legal/privacy-policy/?utm_source=support).

    <Frame>
      <img src="https://mintcdn.com/pextest/4XKZ8SDv0u7DUjZE/images/administrator-guide/connector-for-google-drive/image-6.png?fit=max&auto=format&n=4XKZ8SDv0u7DUjZE&q=85&s=a8df6d5cdd407d3546adc00a5695b595" alt="" width="1235" height="632" data-path="images/administrator-guide/connector-for-google-drive/image-6.png" />
    </Frame>
  </Accordion>
</AccordionGroup>

For any questions related to your connector, please email [appsupport+googledrive@pexcard.com](mailto:appsupport+googledrive@pexcard.com)
