Web-Automation-Assistant-with-Puppeteer-Gemini-AI Tailwind Templates

Web Automation Assistant With Puppeteer Gemini Ai

Built a web tool to automate browser tasks using user prompts. Integrated Gemini AI to generate Puppeteer scripts for navigation, interaction, and error handling. Developed a Flask backend to process requests, execute scripts, and log results. Created a responsive frontend with Tailwind CSS and CodeMirror for script display.

Web Automation Assistant with Puppeteer and Gemini AI

This project is a web-based automation tool that generates and executes Puppeteer scripts using Google Gemini AI. It allows users to automate browser tasks such as navigation, interaction with web elements, and handling common dialogs by simply providing a text prompt.

Features

  • AI-Powered Script Generation: Uses Google Gemini AI to generate Node.js Puppeteer scripts based on user prompts.
  • Flask Backend: Handles user requests, generates scripts, and executes them using subprocesses.
  • Responsive Frontend: Built with Tailwind CSS and CodeMirror for a clean and interactive user interface.
  • Logging and Error Handling: Ensures robust script execution and provides detailed logs for debugging.
  • User-Friendly: Simplifies complex web automation tasks with minimal user input.

Technologies Used

  • Backend: Python, Flask
  • AI Integration: Google Gemini API
  • Automation: Puppeteer (Node.js)
  • Frontend: HTML, CSS, JavaScript, Tailwind CSS, CodeMirror
  • Logging: Python logging module

How It Works

  1. The user inputs a prompt describing the browser automation task (e.g., "Go to Google, search for 'web automation', and take a screenshot").
  2. The Flask backend sends the prompt to the Gemini API, which generates a Puppeteer script.
  3. The backend executes the script using Node.js and returns the results (logs, output, or errors) to the frontend.
  4. The user can view the generated script, execution logs, and output in the browser.

Installation

Clone the repository:

git clone https://github.com/jayachandranpm/Web-Automation-Assistant-with-Puppeteer-Gemini-AI.git
cd web-automation-assistant

1) Install dependencies:

pip install -r requirements.txt
npm install puppeteer

2) Set up the Gemini API key:

Create a .env file in the root directory and add your Gemini API key:

GEMINI_API_KEY=your_api_key_here

4) Run the Flask application:

python app.py

5) Open your browser and navigate to http://localhost:5000.

Top categories

Loading Svelte Themes