Custom Component Library for Langflow - Extending AI Workflow Capabilities
Langflow Factory is a comprehensive collection of custom components designed to extend Langflow's capabilities with powerful integrations, data processing tools, and AI-powered generators. Built with production-ready patterns and extensive error handling.
- Google Cloud Platform: BigQuery, Cloud Scheduler, Drive integration
- WhatsApp/Evolution API: Complete messaging automation
- Google Sheets: Read, write, and query operations
- Apollo: Organization search capabilities
- Astra DB: Vector database operations
- Enhanced DataFrame Operations: Advanced data manipulation
- File Processing: Multi-format support with encoding detection
- Structured Output: Type-safe data transformation
- Data Validation: Robust input/output validation
- Image Generation: OpenAI DALL-E, Google Imagen
- Audio Generation: ElevenLabs, OpenAI TTS
- Text Processing: Advanced natural language operations
- API Request Builder: Dynamic HTTP client with authentication
- Conditional Router: Smart flow control
- Dynamic UI Components: Real-time field updates
langflow-factory/
βββ .cursor/ # Development rules and guidelines
β βββ index.mdc # Project-wide Cursor rules
β βββ rules/ # Context-specific rules
βββ components/ # Custom Langflow components
β βββ api_request/ # HTTP request builders
β βββ audio_management/ # Audio generation components
β βββ gcp/ # Google Cloud integrations
β βββ google_sheets/ # Sheets API components
β βββ image_generators/ # Image generation tools
β βββ [other categories]/
βββ flows/ # Example flows and configurations
βββ tests/ # Component testing framework
βββ scripts/ # Utility scripts
- Python 3.8+
- Langflow installed and running
- Required API keys for integrations
- Clone the repository:
git clone https://github.com/Empreiteiro/langflow-factory.git
cd langflow-factory- Install dependencies:
pip install -r requirements.txt- Add components to Langflow:
- Copy component files to your Langflow custom components directory
- Or load directly through Langflow's component upload feature
# Example: Using the Enhanced API Request component
from components.api_request.enchanced_api_request import EnhancedAPIRequest
component = EnhancedAPIRequest()
component.url = "https://api.example.com/data"
component.method = "GET"
result = component.make_request()api_request_builder.py- Dynamic HTTP request constructionenchanced_api_request.py- Advanced API client with retry logicapollo_organization_search.py- Company data retrievalastra_db.py- Vector database operations
cloud_scheduler- Automated job schedulingenchanced_big_query.py- BigQuery data operationsgoogle_drive_uploader.py- File upload automationgoogle_sheets/- Complete Sheets API integration
audio_management/- Voice and audio generationwhatsapp_evolution.py- WhatsApp automationtelegram.py- Telegram bot integration
multi-modal_input.py- Audio, video, and image processing with AI analysis- YouTube video download and analysis
- Audio transcription using OpenAI Whisper
- Image analysis using GPT-4V
- Supports direct URLs, YouTube, and Google Drive links
core_data_operations.py- Advanced data manipulationdataFrame_operations- Pandas DataFrame utilitiesenchanced_structured_output.py- Type-safe outputs
Run the test suite to ensure components work correctly:
# Run all tests
python -m pytest tests/
# Run specific component tests
python -m pytest tests/test_api_request.py
# Test YouTube download functionality
python scripts/test_youtube_download.pyIf you encounter "Error downloading video from URL: Failed to download media from URL: Failed to download from YouTube: No file downloaded", follow these steps:
- Install yt-dlp:
pip install yt-dlp-
Install FFmpeg (required for video processing):
- Windows:
winget install FFmpegor download from https://ffmpeg.org/download.html - Mac:
brew install ffmpeg - Linux:
sudo apt install ffmpeg
- Windows:
-
Run the installation script:
python scripts/install_dependencies.py- Test the functionality:
python scripts/test_youtube_download.py- Common issues:
- Private videos: YouTube private videos cannot be downloaded
- Age-restricted content: May require authentication
- Region restrictions: Some videos are not available in certain regions
- Network issues: Check your internet connection
- yt-dlp version: Ensure you have the latest version:
pip install --upgrade yt-dlp
- Follow the patterns in
.cursor/rules/langflow-components.mdc - Use proper error handling with
self.log() - Implement input validation
- Return structured Data/Message/DataFrame objects
- Reference
.cursor/rules/flow-development.mdc - Design for reusability and modularity
- Include proper error handling paths
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-component) - Follow the development guidelines in
.cursor/rules/ - Add tests for new components
- Commit with descriptive messages
- Push and create a Pull Request
When creating new components:
- Inherits from
Component - Implements proper error handling
- Uses
self.log()for logging - Includes input validation
- Has comprehensive docstrings
- Includes example usage
- Has corresponding tests
- Follows naming conventions
- Store API keys securely using Langflow's secret management
- Validate all inputs to prevent injection attacks
- Use HTTPS for external API calls
- Follow the security guidelines in component documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Langflow - The amazing low-code AI platform
- DataStax - For Langflow development and support
- All contributors who help improve this component library
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Check the
.cursor/rules/directory for development guidelines
Made with β€οΈ for the Langflow community