Import Google Drive API Data to Google Sheets [2024] | API Connector (2024)

In this guide, we’ll walk through how to get data from the Google Drive API directly from Google Sheets with just an API key, using the API Connector add-on for Sheets.

This API is pretty useful because it lets you turn your Google Drive contents into an API. You can use Google Drive as a space to host JSON or other content, and then pull it into your spreadsheet, or get metadata about the files on your drive.

Please note that this demo will show only how to get data from publicly shared Google Drive files (getting private files requires OAuth; if there's interest I'll add information on that).

Contents

  • Before You Begin
  • Part 1: Set up your Google Cloud Project
  • Part 2: Get your Google Drive API Key
  • Part 3: Get your File ID
  • Part 4: Pull Google Drive Data into Sheets
  • Part 5: API Documentation

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Set Up Your Google Cloud Project

  1. While logged into your Google account, navigate to https://console.developers.google.com/ and click Select a project.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (1)
  2. A modal will appear, prompting you to choose an existing project or create a new one. You can do either, but here we'll create a new one.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (2)
  3. You'll now see a screen asking you to name your project. Click Create.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (3)

Part 2: Get Your Google Drive API Key

  1. From the dashboard, click Enable APIs and Services.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (4)
  2. Use the search box or scroll down the page to find 'Google Drive API'. Click to select it.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (5)
  3. On the details page, click Enable.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (6)
  4. Back in the dashboard, choose Credentials from the menu.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (7)
  5. Click +Create Credentials > API Key
    Import Google Drive API Data to Google Sheets [2024] | API Connector (8)
  6. You'll now be presented with your API key. You can also restrict your key via this page, to prevent unauthorized use.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (9)

Part 3: Get your File ID

For this demo I first uploaded a small, public JSON file to Google Drive:
Import Google Drive API Data to Google Sheets [2024] | API Connector (10)

To get this file's ID, open Google Drive, right-click the file name, and click Get Link. The File ID will be the long string within the URL, shown in bold text here: https://drive.google.com/file/d/1s8tcak22l06tpDg-5yew_1S09_oD3UjG/view?usp=sharing

Part 4: Pull Google Drive API Data into Sheets

We'll now fetch that JSON file into Sheets. Substitute own file ID and API key into the request URL.

  1. Open up Google Sheets and clickExtensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • Application:Custom
    • Method:GET
    • Request URL:https://www.googleapis.com/drive/v3/files/your_file_id?alt=media&key=your_api_key
  3. Create a new tab and clickSet currentto use that tab as your data destination.
  4. Name your request and click Run. A moment later you’ll see your file in Google Sheets.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (11)

Part 5: API Documentation

Official API documentation: https://developers.google.com/drive/api/v3/reference

Import Google Drive API Data to Google Sheets [2024] | API Connector (2024)

FAQs

How do I import data from API into Google Sheets? ›

Writing the Script to Import Data
  1. We define the API URL in the url variable.
  2. Using UrlFetchApp. ...
  3. We parse the JSON response into a JavaScript object using JSON. ...
  4. We get the active sheet using SpreadsheetApp. ...
  5. Finally, we write the data to the sheet using sheet.

What is the best API connector for Google Sheets? ›

Data Connector is powerful, yet easy-to-use and lets you pull data from any API into your Google Sheets™ worksheet. Just enter your API key or connect via OAuth2. Data Connector is the API connector of choice!

How to get API connector in Google Sheets? ›

After installing Apipheny, open a Google Sheet. In the menu click Extensions > Apipheny > Import API to open the API Connector. If you haven't already, sign up for a developer account on your API of choice, read the API documentation, and get your API URL, endpoint, parameters, key, and headers.

How to fetch API data in Google Sheets? ›

Enable the Google Sheets API:
  1. Go to the Google Cloud Console (console.cloud.google.com).
  2. Create a new project, or select an existing one.
  3. In the library section, enable the Google Sheets API for your project.
  4. Create credentials for your project. ...
  5. Save the API key that's generated.

How do I get data from API to spreadsheet? ›

How to extract the API data
  1. Step 1: retrieve the API data URL.
  2. Step 2: create a new, blank Excel document.
  3. Step 3: paste the API data URL in the Excel document.
  4. Step 4: Enter the credentials.
  5. Step 5: load the API data in the Excel.
Oct 28, 2021

How do I export API data to Google Sheets? ›

Export from any REST API to Google Sheets
  1. Open the Method drop-down and select the operation you want to perform. ...
  2. (Optional) Enter one or more parameters. ...
  3. (Optional) In the Output options, configure how your data will be inserted into your spreadsheet.
  4. Schedule a refresh for your export.

What is the difference between API and connector? ›

APIs are generally easier to maintain because they follow standard rules. Connectors require more specialized care and need to be updated to work with specific systems.

How much does it cost to use Google Sheets API? ›

Google Sheets' API is free to use, but usage limits apply to each user. If your app experiences heavy traffic from many users, you'll see an error message (429: Too many requests). In other words, if you exceed the number of requests, your account won't be charged for the overage.

How much is API connector Google Sheets? ›

Unlock the power of data with Apipheny, a free API connector that makes it easy to import data from or push data to any REST JSON or CSV API directly from your Google Sheets™. If playback doesn't begin shortly, try restarting your device. Your browser can't play this video.

Do you have to pay for Google Sheets API? ›

All use of the Google Sheets API is available at no additional cost.

Can we call API from Google Sheets? ›

Call REST API from Google Sheets. Sync REST API data sources and automate data refreshes within Google Sheets, streamline workflows, and most importantly - save time. Apipheny is a powerful no-code REST API connector that makes it easy to make API calls from Google Sheets.

How do I enable API in Google Sheets? ›

To enable an API for your project:
  1. Go to the API Console.
  2. From the projects list, select a project or create a new one.
  3. If the APIs & services page isn't already open, open the console left side menu and select APIs & services, and then select Library.
  4. Click the API you want to enable. ...
  5. Click ENABLE.

Can you query API in Google Sheets? ›

Google Sheets Query uses the Google API Query Language to retrieve and manipulate data from the Google Sheets API. For example, you want to retrieve all rows from a sheet where the value in column A is greater than 10.

How do I import JSON into Google Sheets? ›

Using Third-Party Add-ons

Third-party add-ons like ImportJSON offer a no-code solution to import JSON data into Google Sheets. Install the ImportJSON add-on from the Google Workspace Marketplace. After installation, use the =IMPORTJSON("URL") function directly in your Google Sheet, where "URL" is your JSON source.

How do I auto pull data in Google Sheets? ›

Smart Fill will detect patterns and make suggestions to help automate data entry. You can use Smart Fill for tasks such as extracting the first name from a given list of full names or finding values in a range or table.

How do I import JSON data into Google Sheets? ›

Using Third-Party Add-ons

Third-party add-ons like ImportJSON offer a no-code solution to import JSON data into Google Sheets. Install the ImportJSON add-on from the Google Workspace Marketplace. After installation, use the =IMPORTJSON("URL") function directly in your Google Sheet, where "URL" is your JSON source.

How do I import data from the Web into Google Sheets? ›

Here's how you can use the IMPORTDATA function: Open a Google Sheets document or create a new one. Select the cell where you want the imported data to appear. In that cell, enter the following formula: =IMPORTDATA(url), replacing "url" with the actual URL of the data source you want to import.

How do I automatically import data into Google Sheets? ›

Import Live Data to Google Sheets: Top Methods and Tools
  1. Step 1 – Install Coefficient.
  2. Step 2 – Import Live Data.
  3. Filter, sort, and limit rows to import only the data that you want into Google Sheets.
  4. Step 3 – Schedule Automatic Data Refreshes.
Jun 16, 2023

Can you do API calls in Google Sheets? ›

Call REST API from Google Sheets. Sync REST API data sources and automate data refreshes within Google Sheets, streamline workflows, and most importantly - save time. Apipheny is a powerful no-code REST API connector that makes it easy to make API calls from Google Sheets.

Top Articles
Sherlock Holmes, his brother Mycroft and network redundancy - Award Consulting
How to Create A New Gmail Account: 5 Reasons Why It’s Not Working
Dairy Queen Lobby Hours
Poe Pohx Profile
Phenix Food Locker Weekly Ad
Music Archives | Hotel Grand Bach - Hotel GrandBach
Texas (TX) Powerball - Winning Numbers & Results
Jesus Revolution Showtimes Near Chisholm Trail 8
A Fashion Lover's Guide To Copenhagen
Infinite Campus Parent Portal Hall County
Delectable Birthday Dyes
Ave Bradley, Global SVP of design and creative director at Kimpton Hotels & Restaurants | Hospitality Interiors
Ap Chem Unit 8 Progress Check Mcq
Shariraye Update
Calmspirits Clapper
Local Collector Buying Old Motorcycles Z1 KZ900 KZ 900 KZ1000 Kawasaki - wanted - by dealer - sale - craigslist
Nj State Police Private Detective Unit
The ULTIMATE 2023 Sedona Vortex Guide
Arboristsite Forum Chainsaw
Finger Lakes Ny Craigslist
Craiglist Kpr
Toy Story 3 Animation Screencaps
Chelactiv Max Cream
How Much Is Tay Ks Bail
Kp Nurse Scholars
Schedule 360 Albertsons
Ruse For Crashing Family Reunions Crossword
라이키 유출
Kcwi Tv Schedule
Pensacola Tattoo Studio 2 Reviews
TJ Maxx‘s Top 12 Competitors: An Expert Analysis - Marketing Scoop
Stephanie Bowe Downey Ca
Myra's Floral Princeton Wv
Rlcraft Toolbelt
Persona 4 Golden Taotie Fusion Calculator
Strange World Showtimes Near Atlas Cinemas Great Lakes Stadium 16
Tas Restaurant Fall River Ma
Hair Love Salon Bradley Beach
Black Adam Showtimes Near Amc Deptford 8
Personalised Handmade 50th, 60th, 70th, 80th Birthday Card, Sister, Mum, Friend | eBay
Space Marine 2 Error Code 4: Connection Lost [Solved]
ATM Near Me | Find The Nearest ATM Location | ATM Locator NL
Craigslist Jobs Brownsville Tx
Umiami Sorority Rankings
Tinfoil Unable To Start Software 2022
Gary Vandenheuvel Net Worth
Deezy Jamaican Food
From Grindr to Scruff: The best dating apps for gay, bi, and queer men in 2024
Pickwick Electric Power Outage
Jigidi Free Jigsaw
Wrentham Outlets Hours Sunday
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 5815

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.