This project automates the first steps of the job application process on LinkedIn's "Easy Apply" jobs by using a Tampermonkey userscript to extract job application HTML and sending it to a Go backend powered by the Gemini API. The AI analyzes the form and returns JavaScript code to fill out the form fields automatically.
To run this project, you need two main components running simultaneously:
- Frontend (Browser): A modern web browser with the Tampermonkey extension installed.
- Backend (Server): A Go environment running the backend server, exposed publicly via ngrok.
The userscript, content_script.js, runs in your browser to interact with the LinkedIn page.
This script must be run using the Tampermonkey browser extension (available for Chrome, Firefox, Edge, etc.). Tampermonkey provides the necessary security grants (GM_xmlhttpRequest, GM_addElement) to communicate with your local API server without being blocked by LinkedIn's Content Security Policy (CSP).
- Install Tampermonkey: Install the Tampermonkey extension for your browser.
- Create a New Script:
- Click the Tampermonkey icon in your browser toolbar.
- Select Create a new script....
- Paste Code: Replace the default content with the complete code from your content_script.js file (provided in previous steps).
- Save: Save the script (usually by clicking File -> Save or pressing Ctrl+S/Cmd+S).
- Verification: Ensure the script is enabled in the Tampermonkey Dashboard.
The Go backend handles the connection to the Gemini API and contains the core logic for generating form-filling scripts.
The Go program requires the following environment variables to be set before running the server:
| Variable | Description |
|---|---|
| GEMINI_API_KEY | Your API key for accessing the Google Gemini API. |
| RESUME_FILE_PATH | Path to .txt file containing your resume information. |
Example (.env file content):
GEMINI_API_KEY="YOUR_SECRET_API_KEY_HERE"
Because the Tampermonkey script runs inside your browser and needs to communicate with your local Go server, you must use ngrok to create a secure, publicly accessible tunnel.
-
Start your Go server. (Assuming it runs on port 8080).
-
Run ngrok: Execute the following command in your terminal:
ngrok http 8080- If your Go server runs on a different port, replace 8080 with the correct port number.
-
Update Script: Ngrok will provide a public URL (e.g., https://xxxx.ngrok-free.app). You MUST update this URL in your Tampermonkey script (content_script.js) at the following line:
// content_script.js
const API_ROOT = "YOUR_NGROK_URL_HERE";
// Example: const API_ROOT = "[https://58d35aa75449.ngrok-free.app\](https://58d35aa75449.ngrok-free.app)";
- Start the Go server locally.
- Start ngrok and confirm the public URL matches the API_ROOT in your Tampermonkey script.
- Navigate to LinkedIn Job Search: Go to a LinkedIn jobs search results page (e.g., https://www.linkedin.com/jobs/search/?keywords=software%20developer).
- Watch the Magic: The script will automatically:
- Extract all job listings.
- Click the first job's detail panel.
- Click "Easy Apply" (if available).
- Send the modal content to the AI via your ngrok tunnel.
- Execute the returned script to fill out the form.
- If the job list is exhausted, it clicks the "Next" pagination button and restarts the process on the new page.