JobApplicationTracker is a Google Apps Script project designed to automate and manage the tracking of job applications using Gmail and the GeminiAPI. This script filters job-related emails and extracts crucial information, such as job titles, company names, application statuses, and more, and inputs them into a Google Sheets document.
- Uses Gmail API to search for job-related emails based on a customizable query.
- Filters emails for relevance using a two-step process with Gemini's language models.
- The script first uses a smaller model (8B parameters) to determine if an email is relevant based on its subject.
- If the email is relevant, a larger model processes the body to extract key job information.
- The script extracts job status, title, company, location, and any status updates.
- Additionally, it logs the date of the email and provides a link to the original email thread.
- All extracted information is organized and stored in a Google Sheets document for easy tracking and management.
- Google Apps Script: Ensure you have access to Google Apps Script linked with your Gmail and Google Sheets.
- Gmail API: Enable Gmail API access for your Google account.
- GeminiAPI Access: Obtain a GeminiAPI key and enable access to the required models.
-
Clone or Download the Repository
- Clone this repository or download the source files to your local system.
-
Set Up the Google Apps Script
- Open Google Apps Script in your browser.
- Create a new project and paste the code from
code.gsandfunctions.gsinto separate script files.
-
Configure Script Properties
- Set your
GOOGLE_API_KEYin the script properties to authenticate API requests.
- Set your
-
Google Sheets Setup
- Create a new Google Sheets document.
- Note the URL of your Google Sheets document and update it in the
input_to_sheetfunction withinfunctions.gs.
-
Run the Script
- Authorize the script to access your Gmail and Google Sheets.
- Execute the
getGmailMessagesfunction to start the job application tracking process.
- The script performs a Gmail search using a custom query, targeting job-related emails.
- Each email is processed, starting from the oldest, to ensure chronological tracking.
- The subject and a snippet of the body are passed to a smaller Gemini model to decide if the email should be analyzed further.
- If deemed relevant, the full email body is sent to a larger Gemini model for detailed data extraction.
- Extracted data is formatted and written to the "Job Applications" sheet in the connected Google Sheets document.
- The script keeps track of API tokens used and logs any skipped or unsuccessful attempts.
- Search Queries: Modify the
searchQueryvariable incode.gsto fit your job application email patterns. - Sheet Configuration: Ensure your Google Sheets structure matches the script's expected format.
- Prompt and Payload: Similarly, there are prompts in the functions.gs file, you can customize them to get extra or other information.
- Example of Gmail email search and filtering.
- Extracted data in Google Sheets.
- Detailed job application tracking.
- Enhanced Email Parsing: Improve model prompts for better accuracy.
- Dashboard Integration: Develop a dashboard for visualizing application progress.
- Automated Alerts: Add notifications for critical updates or reminders.
Contributions are welcome! Feel free to fork the repository and create a pull request. Please ensure your changes are well-documented and tested.
This project is open-sourced under the MIT License.
For any issues or feature requests, please open an issue on GitHub.
Developed by Prayag Purohit.