Package to apply for jobs automatically and send emails
Project description
AIJobApply
Automate your job application process using AI, Google Sheets, and Email services.
Table of Contents
- Overview
- Features
- Prerequisites
- Google Sheets Setup
- Adding a Job
- Google API Credentials with OAuth 2.0
- OpenAI API Setup
- Project Structure
- Installation
- Configuration
- Usage
Overview
AIJobApply
simplifies and automates the job application process using cutting-edge technologies like OpenAI's GPT, Google Sheets for job management, and automated email services.
Features
- Automated Message Generation: Uses OpenAI's GPT API to customize application messages.
- Google Sheets Integration: Manages job details and status updates.
- Email Integration: Sends out emails with customized messages.
- Command-Line Interface: Easy-to-use CLI for managing the application process.
Prerequisites
- Python 3.8 or higher.
- OpenAI GPT API access.
- Google App Password
Adding a Job (Optional)
A job can be added to the google sheet either manually or you can use the RPI tool provided by Bardeen. This tool allows for a streamlined process of adding job listings through automation. For detailed instructions on how to use this tool, refer to the following Bardeen playbook: LinkedIn Autobook.
Google Service Account Setup
To access the Google Sheets API, you need to create a service account and obtain the credentials file.
-
Google Cloud Console: If you don't already have a Google Cloud account, sign up at Google Cloud Console.
-
Create a Project: Create a new project in the Google Cloud Console.
-
Enable the Google Sheets API: Navigate to the Google Sheets API page and enable the API for your project.
-
Enable the Google Drive API: Navigate to the Google Drive API page and enable the API for your project.
-
Create a Service Account: Navigate to the Service Accounts page and create a new service account for your project.
-
Download Credentials: After creating the service account, download the JSON credentials file. This file contains the necessary information to authenticate your application with the Google Sheets API.
-
Set Environment Variable: Set the
GOOGLE_APPLICATION_CREDENTIALS
environment variable to point to the location of the credentials file. This environment variable is used by the Google Cloud client libraries to authenticate requests to the API.For Unix-like systems (Linux, macOS):
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials.json
For Windows: (Command Prompt or PowerShell), use the following command for all subsequent commands in the same terminal session:
set GOOGLE_APPLICATION_CREDENTIALS=C:\path\to\your\credentials.json
Google Sheets Setup
For setting up your job application data, AIJobApply utilizes Google Sheets. To get started quickly, you can use our pre-defined template. Access the Google Sheets template here: AIJobApply Google Sheets Template.
To make a copy of the template, click on File
> Make a copy
. This will create a copy of the template in your Google Drive. Name the copy as AIJobApply
You need to provide the sheet access to the service account created. To do this, click on Share
and add the email address of the service account.
Open the credentials.json file and copy the client_email value and paste it in the Add people and groups
section.
Ensure that the service account has Editor
access to the sheet.
OpenAI API Setup
To utilize the OpenAI GPT API for message generation, follow these steps to obtain an API key:
-
OpenAI Account: If you don't already have an OpenAI account, sign up at OpenAI.
-
API Access: Once logged in, navigate to the API section.
-
Create an API Key: Follow the instructions to create a new API key.
-
Secure the API Key: Store your API key securely. It's recommended to use environment variables for accessing the API key in your application.
export OPENAI_URL=https://api.openai.com/v1/ export OPENAI_API_KEY=your_openai_api_key
Gmail Setup
To send emails using the Gmail service.
-
If you are not using 2FA, you can use your regular Gmail password.
-
If you are using 2FA, you need to set up an App Password. Follow these steps to generate an App Password:
-
Google Account: If you don't already have a Google account, sign up at Google.
-
App Password: Navigate to the App Passwords section of your Google account.
-
Generate Password: Select
Mail
andOther
from the dropdown menus. Enter a name for the application and clickGenerate
. -
Secure the Password: Store your App Password securely. It's recommended to use environment variables for accessing the App Password in your application.
```bash export GMAIL_ADDRESS=your_gmail_address export GMAIL_PASSWORD=your_gmail_application_password ```
LinkedIn Setup
To send LinkedIn connection requests and messages, you need to provide your LinkedIn credentials.
export LINKEDIN_USERNAME=your_linkedin_username
export LINKEDIN_PASSWORD=your_linkedin_password
Templates Setup
Create a folder named 'templates'. Inside this folder, add the following templates:
- cover_letter_template.pdf: A PDF file containing your cover letter template. This will be used as a base for generating customized cover letters.
- resume_template.pdf: A PDF file containing your resume template. This will be used as a base for generating customized resumes.
- email_template.pdf: A PDF file containing your email template. This will be used as a base for generating customized emails and LinkedIn messages.
- linkedin_note_template.pdf: A PDF file containing your LinkedIn note template. This will be used as a base for generating customized LinkedIn notes when sending connection requests.
Set the environment variable TEMPLATES_PATH
to the path of the templates folder.
export TEMPLATES_PATH=path_to_your_templates_folder
Security Warning
⚠️ Important: Be cautious with sensitive information such as API keys, usernames, and passwords. Avoid storing them in scripts or files that might be shared or committed to version control. It's always safer to use more secure methods for managing sensitive environment variables, such as a secure vault service or encrypted files.
Installation
(Optional but Recommended) Create a Python virtual environment:
python -m venv .venv
source .venv/bin/activate
Install from PyPI
pip install aijobapply
Install from Source
git clone https://github.com/sandeeppvn/AIJobApply.git
cd AIJobApply
pip install -e .
export PYTHONPATH=$(pwd)
Usage
After installation, the application can be run using the aijobapply
command.
If the environment variables are set correctly, you can run the application using the following command:
aijobapply
Alternatively, if you want to run the application without setting environment variables, you can pass the required credentials as command line arguments:
aijobapply --openai-api-key your_openai_api_key --gmail_address your_gmail_address --gmail-password your_gmail_application_password --linkedin_username your_linkedin_username --linkedin_password your_linkedin_password --templates_path path_to_your_templates_folder --google_credentials path_to_your_google_credentials_file --gsheet_name your_google_sheet_name --selenium_driver_path path_to_your_selenium_driver --model your_openai_model_name
Additional command line arguments are available. Use --help to see all options and their descriptions:
aijobapply --help
Selenium Driver Setup
To automate the LinkedIn connection request and message sending process, you need to download the appropriate Selenium driver for your browser. The Selenium driver is used by the Selenium Python library to automate the browser actions. Currently, the following Selenium drivers are supported:
- Chrome: ChromeDriver
Download the appropriate driver for your browser and set the environment variable SELENIUM_DRIVER_PATH
to the path of the driver executable.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file AIJobApply-4.0.0.tar.gz
.
File metadata
- Download URL: AIJobApply-4.0.0.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b933789ed8ad686be9d677602831bf8d5ca581ac97484ed4415396cf30d80d8 |
|
MD5 | 6a4a6ed2ee77aba8b01be0fe25043738 |
|
BLAKE2b-256 | 33fbb73095e98517f7ebf80f042fda8c8911d4824bec6d2e5ed71261c2d7e859 |
File details
Details for the file AIJobApply-4.0.0-py3-none-any.whl
.
File metadata
- Download URL: AIJobApply-4.0.0-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0b9d75daf1aff22de2318594a03a0f5aa49d45f3e3f9fe2aec6258d310edea9 |
|
MD5 | 606cc108b8402b40b034c65d6f6d8229 |
|
BLAKE2b-256 | f9d625054bb7b9aa2ebfe39a3b69ace99d4b3a5c43d91b46c55cec0ec409ece8 |