PySheetX is a Python-based application that integrates with Google Sheets and OpenAI's GPT models to automate data management and analysis. It enables users to interact with Google Sheets by providing an easy-to-use interface that connects to Google Sheets API and allows AI-powered prompts to manipulate data within the spreadsheet.
Note: This project is currently in Beta and not fully complete. Some features may still be under development.
- Google Sheets Integration: Load, read, and update data from Google Sheets.
- AI-Powered Automation: Use OpenAI's GPT models to analyze and generate new data based on spreadsheet content.
- Interactive Interface: User-friendly UI built with PySide6 to guide users through API key setup, Google Sheet selection, and AI prompt submission.
- Prompt Customization: Set custom prompts to control how the AI processes the spreadsheet data (e.g., read, add new rows, etc.).
- Validation and Authentication: Securely authenticate Google Sheets API using
credentials.jsonand OpenAI API key.
-
Python 3.x installed on your system.
-
The following Python packages should be installed:
pip install PySide6 google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client openai
-
Google Sheets API enabled and a
credentials.jsonfile obtained from the Google Cloud Console. -
An OpenAI API key.
-
Clone the repository:
git clone https://github.com/yourusername/pysheetx.git cd pysheetx -
Install the required Python packages:
pip install -r requirements.txt
-
Launch the application:
python pysheetx.py
-
Follow the on-screen instructions to upload your
credentials.json, input the OpenAI API key, and select the Google Sheet and range to interact with.
- Step 1: Enter your OpenAI API key and upload your
credentials.jsonfile to authenticate with Google Sheets. - Step 2: Input the Google Sheet ID, specify the range of data you want to interact with, and enter your AI prompt. The AI can either read the data, update existing rows, or add new rows based on your input.
- Step 3: Click "Submit to AI" to process the data. The AI will generate a response and update the spreadsheet accordingly.
1- Download Google Sheets API Credentials
- Go to the Google Developers Console.
- Create a new project (or select an existing one).
- Enable the Google Sheets API and the Google Drive API.
- Download the credentials.json file.
- Upload the credentials.json file in the app when prompted.
2- Set OpenAI API Key
- Sign up on OpenAI's website to get an API key. Enter the key in the application when prompted.
If you wish to contribute or make changes to the project, please fork the repository and submit a pull request.
pysheetx/
├── main.py # Main application file
├── requirements.txt # Python dependencies
└── README.md # Project documentation
This project is licensed under the MIT License - see the LICENSE file for details.

