ai_web_automation
The AI Web Automation module provides a comprehensive framework for automating web interactions using AI-powered browser automation with Playwright MCP (Model Context Protocol) integration. It enables site builders and developers to create, manage, and execute complex web automation scenarios through a user-friendly interface.
Features
AI Web Automation brings powerful browser automation capabilities to Drupal through integration with Playwright MCP (Model Context Protocol). This module enables you to:
- Visual Scenario Builder - Create automation workflows using a drag-and-drop interface
- Pre-built Step Library - Navigate pages, click elements, fill forms, extract data, take screenshots, and more
- Real-time Execution - Watch your automations run with live progress updates
- Data Extraction - Pull information from web pages and store it as variables
- Conditional Logic - Build smart workflows that adapt based on page content
- Security Controls - Restrict automation to approved URLs and control JavaScript execution
Common Use Cases:
- Automated testing of web applications
- Data scraping and content migration
- Form submission and validation testing
- Screenshot generation for documentation
- Competitive analysis and monitoring
- Quality assurance workflows
Post-Installation
After installing the module:
- Configure MCP Connection: Navigate to
Configuration > AI > AI Web Automationto set up your Playwright
MCP server connection - Create Your First Scenario: Go to
Content > Automation Scenariosand click "Add automation
scenario" - Build Your Workflow: Add steps like Navigate, Click, Type, and Extract to create your automation
- Test and Execute: Use the preview mode to test, then execute your scenario
Key Configuration Areas:
- MCP Settings: Server URL and authentication
- Security Settings: URL whitelisting and JavaScript permissions
- Browser Settings: Headless mode, viewport size
- Storage Settings: Screenshot retention policies
Additional Requirements
- Drupal Core: Version 11 or later
- PHP: Version 8.3 or later
- AI Module: Required for menu integration ( href="https://www.drupal.org/project/ai">drupal.org/project/ai)
- Playwright MCP Server: External service that handles browser automation (must be installed separately)
Note: This module requires a running Playwright MCP server. The MCP server is not included with the module and must be
set up independently.
Recommended modules/libraries
- Key Module: For secure storage of API credentials
- Queue API: For background execution of long-running scenarios
- Rules Module: To trigger automations based on events
- Views Module: For creating custom automation dashboards
Similar projects
While there are other automation tools available, AI Web Automation is unique in its approach:
- vs. Migrate modules: AI Web Automation can interact with dynamic JavaScript-heavy sites and handle complex user
interactions that traditional scrapers cannot - vs. Testing frameworks: Provides a no-code visual interface accessible to non-developers
- vs. External automation tools: Fully integrated with Drupal's permission system and content management
Supporting this Module
This module is maintained by @sudofly. To support ongoing development:
- Report issues and contribute patches on the issue queue
- Share your use cases and success stories
- Help improve documentation
Community Documentation
- Video Tutorial: Getting Started with AI Web Automation (coming soon)
- Example Scenarios Repository (coming soon)
- MCP Server Setup Guide (coming soon)
Security Considerations
This module can interact with external websites on your behalf. Always:
- Use URL whitelisting in production environments
- Review scenarios before execution
- Limit permissions to trusted users only
- Monitor execution logs regularly
Developer Resources
Developers can extend the module by creating custom step plugins. See the README.md file in the module directory for API documentation
and examples.