---
title: "Integrating AI in Google Sheets with Google Apps Script: How to Pass Prompts to ChatGPT and Get a Response"
author: "Aryan Irani"
date: 2023-04-17T20:30:17+00:00
canonical_url: https://pulse.appsscript.info/p/2023/04/integrating-ai-in-google-sheets-with-google-apps-script-how-to-pass-prompts-to-chatgpt-and-get-a-response/
markdown_url: https://pulse.appsscript.info/p/2023/04/integrating-ai-in-google-sheets-with-google-apps-script-how-to-pass-prompts-to-chatgpt-and-get-a-response.md
categories:
  - "AI"
  - "Intermediate"
  - "Sheets"
  - "Solutions"
tags:
  - "@aryanirani123"
  - "Medium"
featured_image: https://pulse.appsscript.info/files/2023/04/Kyrie-Petrakis-10-1.png
description: "We've a new contributor on Pulse with Aryan Irani joining the team. Here's his latest contribution: \"This blog post discusses how to integrate AI in Google Sheets using Google Apps Script by passing prompts to ChatGPT, a large language model. It provides step-by-step instructions on how to set up the integration and use it to generate responses to prompts\""
---

# Integrating AI in Google Sheets with Google Apps Script: How to Pass Prompts to ChatGPT and Get a Response

![Integrating AI in Google Sheets with Google Apps Script: How to Pass Prompts to ChatGPT and Get a Response](https://pulse.appsscript.info/files/2023/04/Kyrie-Petrakis-10-1.png)

> [https://aryanirani123.medium.com/integrating-ai-in-google-sheets-with-google-apps-script-how-to-pass-prompts-to-chatgpt-and-get-a-9a5ad38556e6](https://aryanirani123.medium.com/integrating-ai-in-google-sheets-with-google-apps-script-how-to-pass-prompts-to-chatgpt-and-get-a-9a5ad38556e6)
> Have you heard about ChatGPT? It’s the latest buzz in the world of AI and everyone’s eager to unleash its true powers. As I delved deeper, I wondered — is it possible to integrate ChatGPT with Google Sheets? Can we pass prompts from Google Sheets and get a response from ChatGPT?
> After some research, I discovered that it’s indeed possible to integrate ChatGPT with Google Sheets using the Open AI API. In this blog, we’ll be exploring how to bring AI to your spreadsheets using the Open AI API and Google Apps Script.

This blog post discusses how to integrate AI in Google Sheets using Google Apps Script by passing prompts to ChatGPT, a large language model. It provides step-by-step instructions on how to set up the integration and use it to generate responses to prompts.

Source: [Integrating AI in Google Sheets with Google Apps Script: How to Pass Prompts to ChatGPT and Get a Response**](https://aryanirani123.medium.com/integrating-ai-in-google-sheets-with-google-apps-script-how-to-pass-prompts-to-chatgpt-and-get-a-9a5ad38556e6)

 

---

*Published by [Aryan Irani](https://pulse.appsscript.info/p/author/aryanirani/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2023/04/integrating-ai-in-google-sheets-with-google-apps-script-how-to-pass-prompts-to-chatgpt-and-get-a-response/](https://pulse.appsscript.info/p/2023/04/integrating-ai-in-google-sheets-with-google-apps-script-how-to-pass-prompts-to-chatgpt-and-get-a-response/)*
