Search

Connectors

Contact support

Helpdesk portal

Google Drive - Getting Started in Peliqan

Google Drive - Getting Started in Peliqan

Google Drive is a cloud-based file storage and collaboration service that helps organizations manage documents, spreadsheets, and other files centrally. It supports secure sharing, real-time collaboration, and seamless integration with external applications and workflows.

This article provides an overview to get started with the Google Drive connector in Peliqan. Please contact support if you have any additional questions or remarks.

Pre-Requisites

1. Create a Google Cloud Project

  • Sign in to Google Cloud Console.
  • Create a new Google Cloud Project (or select an existing one).
  • Ensure the project is linked to your Google Workspace (required for Internal apps).

2. Enable Google Drive API

  • Google Cloud Console, on left corner navigate to Menu → More products → Google Workspace → Product Library
  • Locate Drive API and click Enable. This allows your project to access Google Drive resources.

3. Configure OAuth Consent Screen

  • In Google Cloud Console, go to OAuth Consent Screen.
  • image
  • Under App Information, provide an application name and support email. Click Next
  • Under Audience, Select Internal (recommended for Workspace-only usage). Click Next.
  • Under Contact Information, Enter an email address for Google notifications. Click Next.
  • Review the Google API Services User Data Policy, click Continue and then Create. OAuth consent screen is now configured.

4. Create OAuth 2.0 Client Credentials

  • Go to: Google Auth Platform → Clients
  • image
  • Click Create Client and Choose Application typeWeb application. Provide a unique name for your application.
  • Under Redirect URI/Callback URI, add: https://oauth.peliqan.io and click Create.
  • Save the generated client_id and client_secret

Connect Google Drive

In Peliqan, go to Connections → Add Connection → Select Google Drive in the list → Enter the Generated client_id and client_secret

image

Click Connect Google Drive to get the OAuth Flow initiated and the data of Google Drive to get synced to Peliqan.

Google Drive data sync to a data warehouse

Peliqan offers an out of the box data warehouse. Optionally the user can choose to sync Google Drive data to their own data warehouse such as Snowflake, Google BigQuery, MS SQL etc.

Data will be synced to the chosen data warehouse and made available through the Peliqan UI for exploration.

image

Get file details

googledrive_api = pq.connect('Google Drive')
file_details = {
    'file_id': "190yWcjVhyg2CfiSq0GIeoRJg84AhgVjQ",
}
result = googledrive_api.get('file_details', file_details)
st.json(result)

Get file download URL

googledrive_api = pq.connect('Google Drive')
file_download_url = {
    'file_id': "190yWcjVhyg2CfiSq0GIeoRJg84AhgVjQ"
}
result = googledrive_api.get('file_download_url', file_download_url)
st.json(result)

Get file Content

googledrive_api = pq.connect('Google Drive')
file_content = {
    'file_id': "10E_DHUpB3ouk2DZ_cDcMNIhAdJMKje3M",
}
result = googledrive_api.get('file_content', file_content)
st.json(result)