{"id":15979624,"url":"https://github.com/thinh-vu/chatgpt_api_google_sheets","last_synced_at":"2025-11-11T04:30:13.339Z","repository":{"id":233681116,"uuid":"622128192","full_name":"thinh-vu/chatgpt_api_google_sheets","owner":"thinh-vu","description":"Simple code to implement ChatGPT API in Google Sheets using Apps Script and custom function","archived":false,"fork":false,"pushed_at":"2023-04-01T08:17:28.000Z","size":188,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T12:13:47.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinh-vu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-01T07:47:14.000Z","updated_at":"2024-01-04T13:23:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"92c1f125-a977-4cc1-9ec8-7e776b1f8171","html_url":"https://github.com/thinh-vu/chatgpt_api_google_sheets","commit_stats":null,"previous_names":["thinh-vu/chatgpt_api_google_sheets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinh-vu%2Fchatgpt_api_google_sheets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinh-vu%2Fchatgpt_api_google_sheets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinh-vu%2Fchatgpt_api_google_sheets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinh-vu%2Fchatgpt_api_google_sheets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinh-vu","download_url":"https://codeload.github.com/thinh-vu/chatgpt_api_google_sheets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239587243,"owners_count":19663892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T00:00:49.217Z","updated_at":"2025-11-11T04:30:13.055Z","avatar_url":"https://github.com/thinh-vu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatGPT API for Google Sheets\n\nThis repository provides a simple code to implement the ChatGPT API in Google Sheets using Apps Script and a custom function.\n\n[ENGLISH]. VIETNAMESE BELOW↓\n## How to use\n\n1. Open a Google Sheets file where you want to run the ChatGPT API.\n2. Navigate to **Extensions \u003e Apps Script** to open the Script Editor.\n3. Copy the code from `ChatGPT_function.js` file and paste it into the `Code.gs` file in the Script Editor.\n![script_editor](https://github.com/thinh-vu/chatgpt_api_google_sheets/blob/main/src/chatgpt_custom_function.png?raw=true)\n4. Obtain an OpenAI API key at the [View API keys](https://platform.openai.com/account/api-keys) section and replace the variable labeled as `YOUR_TOKEN_KEY` with this API key.\n5. Save the project by clicking the disk icon.\n6. Insert the custom function in any cells with the name as `ChatGPT('YOUR PROMPT HERE')`.\n![function_demo](https://github.com/thinh-vu/chatgpt_api_google_sheets/blob/main/src/demo_custom_chatGPT_function.png?raw=true)\n1. Boom! You're done!\n\n---\n[VIETNAMESE]\n\n## Cách sử dụng\n\n1. Mở file Google Sheets bất kỳ mà bạn muốn sử dụng ChatGPT API như một hàm tuỳ chỉnh.\n2. Mở Script Editor bằng cách tìm đến mục **Extension \u003e Apps Script** để mở Script Editor.\n3. Sao chép mã từ tệp `ChatGPT_function.js` và dán vào tệp `Code.gs` trong Script Editor.\n![script_editor](https://github.com/thinh-vu/chatgpt_api_google_sheets/blob/main/src/chatgpt_custom_function.png?raw=true)\n4. Lấy API key của OpenAI tại phần [View API keys](https://platform.openai.com/account/api-keys) và thay giá trị này vào đoạn văn bản `YOUR_TOKEN_KEY`.\n5. Lưu dự án bằng cách nhấp vào biểu tượng đĩa mềm.\n6. Chèn tên hàm tùy chỉnh là `ChatGPT('PROMPT CỦA BẠN TẠI ĐÂY')`.\n![function_demo](https://github.com/thinh-vu/chatgpt_api_google_sheets/blob/main/src/demo_custom_chatGPT_function.png?raw=true)\n7. Bạn đã hoàn tất!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinh-vu%2Fchatgpt_api_google_sheets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinh-vu%2Fchatgpt_api_google_sheets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinh-vu%2Fchatgpt_api_google_sheets/lists"}