---
title: "Using Google Sheets via BigQuery from Google Apps Script with service accounts"
author: "Martin Hawksey"
date: 2022-08-18T21:46:54+00:00
canonical_url: https://pulse.appsscript.info/p/2022/08/using-google-sheets-via-bigquery-from-google-apps-script-with-service-accounts/
markdown_url: https://pulse.appsscript.info/p/2022/08/using-google-sheets-via-bigquery-from-google-apps-script-with-service-accounts.md
categories:
  - "BigQuery"
  - "Intermediate"
  - "Sheets"
  - "Solutions"
tags:
  - "@brucemcpherson"
  - "ramblings.mcpher.com"
featured_image: https://pulse.appsscript.info/files/2022/08/bigqueryappsscript.png
description: "Google Apps Script includes an Advanced service to interact with BigQuery. A limitation with both the Workspace services and Advanced Services don't play nice if you need to use a service account. This post from Bruce Mcpherson provides details of how you can setup your Google Apps Script project to use a service account with BigQuery. "
---

# Using Google Sheets via BigQuery from Google Apps Script with service accounts

![Using Google Sheets via BigQuery from Google Apps Script with service accounts](https://pulse.appsscript.info/files/2022/08/bigqueryappsscript.png)

> I’m using the JSON API for BigQuery rather than the Apps Script advanced service, since I have centralized all my BigQuery datasets in one project, and want to use a Service Account for authorization

Google Apps Script includes an [Advanced service to interact with BigQuery**](https://developers.google.com/apps-script/advanced/bigquery). A limitation with both the Workspace services and Advanced Services don’t play nice if you need to use a [service account**](https://cloud.google.com/iam/docs/service-accounts). This post from Bruce Mcpherson provides details of how you can setup your Google Apps Script project to use a service account with BigQuery.

Source: *[Using Google sheets via Bigquery from Apps Script – Desktop Liberation*](https://ramblings.mcpher.com/gassnippets2/sheetsandbigquery/)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2022/08/using-google-sheets-via-bigquery-from-google-apps-script-with-service-accounts/](https://pulse.appsscript.info/p/2022/08/using-google-sheets-via-bigquery-from-google-apps-script-with-service-accounts/)*
