Lakindu Siriwardana
Workflows by Lakindu Siriwardana
Generate AI-powered lease renewal offers with Ollama LLM, Supabase and Gmail
# 📄 Automated Lease Renewal Offer by Email ## ✅ Features - Automated Lease Offer Generation using AI (Ollama model). - Duplicate File Check to avoid reprocessing the same customer. - Personalized Offer Letter creation based on customer details from Supabase. - PDF/Text File Conversion for formatted output. - Automatic Google Drive Management for storing and retrieving files. - Email Sending with generated offer letter attached. - Seamless Integration with Supabase, Google Drive, Gmail, and AI LLM. ## ⚙️ How It Works 1. Trigger: Workflow starts on form submission with customer details. 2. Customer Lookup: - Searches Supabase for customer data. - Updates customer information if needed. 3. File Search & Duplication Check: - Looks for existing lease offer files in Google Drive. - If duplicate found, deletes old file before proceeding. 4. AI Lease Offer Creation: - Uses the LLM Chain (offerLetter) to generate a customized lease renewal letter. 5. File Conversion: - Converts AI-generated text into a downloadable file format. 6. Upload to Drive: - Saves the new lease offer in Google Drive. 7. Email Preparation: - Uses Basic LLM Chain-email to draft the email body. - Downloads the offer file from Drive and attaches it. 8. Email Sending: - Sends the renewal offer email via Gmail to the customer. ## 🛠 Setup Steps 1. Supabase Connection: - Add Supabase credentials in n8n. - Ensure a customers table exists with relevant columns. ## 🔜Future Steps - Add specific letter template (organization template). - PDF offer letter
Chat with internal documents using Ollama, Supabase Vector DB & Google Drive
# 📚 Chat with Internal Documents (RAG AI Agent) ## ✅ Features - Answers should given only within provided text. - Chat interface powered by LLM (Ollama) - Retrieval-Augmented Generation (RAG) using Supabase Vector DB - Multi-format file support (PDF, Excel, Google Docs, text files) - Automated file ingestion from Google Drive - Real-time document update handling - Embedding generation via Ollama for semantic search - Memory-enabled agent using PostgreSQL - Custom tools for document lookup with context-aware chat ## ⚙️ How It Works ### 📥 Document Ingestion & Vectorization Watches a Google Drive folder for new or updated files. Deletes old vector entries for the file. Uses conditional logic to extract content from PDFs, Excel, Docs, or text Summarizes and preprocesses content. (if needed) Splits and embeds the text via Ollama. Stores embeddings in Supabase Vector DB ### 💬 RAG Chat Agent Chat is initiated via Webhook or built-in chat interface. User input is passed to the RAG Agent. Agent queries the User_documents tool (Supabase vector store) using the Ollama model to fetch relevant content. If context is found, it answers directly. Otherwise, it can call tools or request clarification. Responses are returned to the user, with memory stored in PostgreSQL for continuity. ## 🛠 Supabase Database Configuration 1. Create a Supabase project at https://supabase.com and go to the SQL editor. 2. Create a documents table with the following schema: - id - int8 - content - text - metadata - jsonb - embedding - vector 3. Generate an API Key
Generate AI videos from scripts with DeepSeek, TTS, and Together.ai
# 🔧 Automated Video Generator (n8n Workflow) ## 🚀 Features - End-to-End Video Creation from user idea or transcript - AI-Powered Scriptwriting using LLMs (e.g., DeepSeek via OpenRouter) - Voiceover Generation with customizable TTS voices - Image Scene Generation using generative models like together.ai - Clip Creation & Concatenation into a full video - Dynamic Caption Generation with styling options - Google Drive & Sheets Integration for asset storage and progress tracking ## ⚙️ How It Works User Submits Form with: - Main topic or transcript - Desired duration - TTS voice - Visual style (e.g., Pixar, Lego, Cyberpunk) - Image generation provider AI generates a script: A catchy title, description, hook, full script, and CTA using a language model. Text-to-Speech (TTS): The script is turned into audio using the selected voice, with timestamped captions generated. Scene Segmentation: The script is split into 5–6 second segments for visual storyboarding. Image Prompt Creation: Each scene is converted into an image prompt in the selected style (e.g., "anime close-up of a racing car"). Image Generation: Prompts are sent to together.ai or fal.ai to generate scenes. Clip Creation: Each image is turned into a short video clip (Ken Burns-style zoom) based on script timing. Video Assembly: - All clips are concatenated into a single video. - Captions are overlaid using the earlier timestamps. - Final Output is uploaded to Google Drive, Telegram and links are saved in Google Sheets. ## 🛠 Inital Setup ### 🗣️ 1. Set Up TTS Voice (Text-to-Speech) Run your TTS server locally using Docker. ### 🧰 2. Set Up NCA-Toolkit The nca-toolkit appears to be a custom video/image processing backend used via HTTP APIs: http://host.docker.internal:9090/v1/image/transform/video http://host.docker.internal:9090/v1/video/concatenate http://host.docker.internal:9090/v1/ffmpeg/compose #### 🔧 Steps: Clone or build the nca-toolkit container (if it's a private tool): Ensure it exposes port 9090. It should support endpoints for: Image to video (zoom effect) Video concatenation Audio + video merging Caption overlay via FFmpeg Run it locally with Docker: *docker run -d -p 9090:80 your-nca-toolkit-image* ### 🧠 3. Set Up together.ai (Image Generation) (Optional *You can use ChatGPT API Instead*) This handles image generation using models like FLUX.1-schnell. 🔧 Steps: Create an account at: https://www.together.ai Generate your API key
AI-powered CV filtering with Llama3.1 LLM, Google Drive & Sheets
This visual workflow represents an AI-powered automated CV filtering system created using tools like n8n, Google Drive, Google Sheets, and Ollama (LLM) ## ⚙️ Key Features - ### 📂 Google Drive Integration – Automatically searches and downloads CVs (PDF/DOCX/PPTX) from a shared folder. - ### 📋 Criteria Matching – Reads and applies filtering rules from a Google Sheet. - ### 🧠 LLM-Based Analysis – Uses a Large Language Model (Ollama) to assess and interpret CV content. - ### 🧪 Smart Parsing – Includes structured and auto-fixing output parsers to ensure data accuracy. - ### 📊 Automated Results Output – Writes matching candidates and analysis to a Google Sheet. - ### 🔁 Loop and Aggregate Logic – Handles multiple CVs with iterative processing and aggregation. - ### 🚀 No-Code Automation with n8n – Fully visual, modifiable without programming. ## 🛠️ How It Works Trigger: Workflow is initiated via a Webhook (from a UI “Start Workflow” button). CV Search: Searches for CV files in a designated Google Drive folder. Loop Over Files: Each file is downloaded. Text is extracted (from PDFs or other formats). Criteria Input: Matching rules are fetched from a predefined Google Sheet. Merge & Aggregate: Combines file text and criteria for unified processing. LLM Processing: Text + criteria are sent to the Basic LLM Chain. Utilizes Ollama Model for advanced language understanding. Structured or auto-fixing output parsers enhance reliability. Custom Code Execution: Optionally enriches or reformats the data. Output: Results are appended to a shared Google Sheet (the output sheet).