Skip to main content
H

Habeeb Mohammed

3
Workflows

Workflows by Habeeb Mohammed

Workflow preview: Extract viral-worthy clips from YouTube videos with Gemini AI & FFmpeg editing
Free advanced

Extract viral-worthy clips from YouTube videos with Gemini AI & FFmpeg editing

![Workflow Overview](https://raw.githubusercontent.com/Habeeb-MD-Faiz/n8n/main/images/cliping.jpg) ## Who's it for This workflow transforms hours of manual video editing into an automated AI-powered pipeline. Perfect for anyone looking to repurpose long-form content into viral short-form clips. **Ideal users include:** - **Content Creators** - YouTubers producing long-form videos who want to maximize reach by automatically generating TikTok, Reels, and Shorts from their content - **Social Media Managers** - Agencies and freelancers handling multiple clients who need to scale clip production without hiring additional editors - **Podcasters** - Audio and video podcast hosts wanting to create promotional clips highlighting the best moments from each episode - **Video Editors** - Professional editors looking to automate repetitive clipping tasks and focus on creative decisions rather than technical execution - **Marketing Teams** - B2B and B2C teams extracting key moments from webinars, product demos, tutorials, and educational content for social campaigns Whether you're a solo creator or managing content at scale, this workflow saves 5-10 hours per video while maintaining professional quality output. ## How it works This workflow combines AI analysis with professional video editing tools to automatically identify and produce viral-ready clips from any YouTube video. **The process flows through three main stages:** **Stage 1: Download and Analysis** - Submit a YouTube URL through the built-in form trigger - yt-dlp simultaneously downloads the video in highest quality and extracts subtitles or auto-generated transcripts - The transcript is intelligently chunked into 150-segment batches for optimal AI processing - Each batch is analyzed by Gemini AI using specialized prompts that evaluate viral potential based on hooks, pacing, emotional peaks, and engagement triggers - AI identifies 3-5 high-quality moments per batch and assigns virality scores to each potential clip **Stage 2: Clip Selection and Extraction** - All AI-identified clips are merged and sorted by their virality scores - The top 10 candidates are automatically selected for processing - FFmpeg extracts each clip segment from the original video at precise timestamps - Clips are processed sequentially to prevent system overload **Stage 3: Professional Editing Pipeline** - Each clip enters a multi-stage editing subworkflow with automated operations: - Smart 9:16 cropping that intelligently frames the subject for vertical platforms - Precise trimming to remove dead air and optimize pacing - Dynamic subtitle generation with sizing calculated based on video resolution - Professional subtitle styling including bold text, high-contrast colors, strategic positioning, and text wrapping - Subtitles are burned directly into the video as permanent overlays **Final Delivery:** The workflow processes clips with configurable wait times to match your system's capabilities. When all clips complete processing, you receive an email notification and find your social-ready clips in the `/data/clips/` directory, ready for upload to any platform. ## Requirements **⚠️ Self-hosted n8n only** - This workflow requires command-line access and cannot run on n8n Cloud due to its dependency on system-level tools. **System dependencies you must install:** - **FFmpeg** - Industry-standard video processing tool for trimming, cropping, and subtitle burning. Install on your n8n host system following [this comprehensive guide](https://docs.n8n.io/integrations/community-nodes/installation/gui-install/). Most Linux systems can install via package manager: `apt-get install ffmpeg` or `yum install ffmpeg`. - **yt-dlp** - Advanced YouTube downloader that handles video and subtitle extraction. Follow [official installation instructions](https://github.com/yt-dlp/yt-dlp#installation). Recommended: `pip install yt-dlp` or direct binary download. - **FFprobe** - Usually included with FFmpeg, used for detecting video dimensions for dynamic subtitle sizing. **Credentials needed:** - **Google Gemini API account** - Powers the AI analysis for clip identification and editing instructions. [Get your free API key](https://ai.google.dev/) with generous free tier limits. - **Gmail OAuth2 credentials** - Enables email notifications when clips are ready. Set up through n8n's credential system. **Storage requirements:** - Ensure `/data/clips/` directory exists with write permissions - Plan for 2-3x the original video size in temporary storage during processing - Final clips typically use 10-30% of original video size ## How to set up **Step 1: Install system dependencies** SSH into your n8n host and install required tools. For Ubuntu/Debian systems, run: ``` apt-get update apt-get install ffmpeg pip install yt-dlp ``` Verify installations by running `ffmpeg -version` and `yt-dlp --version`. **Step 2: Configure directory structure** Create the clips output directory with proper permissions: ``` mkdir -p /data/clips chmod 755 /data/clips ``` **Step 3: Import the workflow** Download the workflow JSON and import it into your n8n instance. You'll see several sticky notes color-coded by stage: yellow for description, blue for download/analysis, pink for editing operations, and green for clipping. **Step 4: Set up credentials** Navigate to the "viral clips identification" node and add your Google Gemini API credentials. The workflow uses the `gemini-2.5-flash` model for optimal speed and quality balance. Then configure Gmail OAuth2 in the "Send a message" node following n8n's authentication wizard. **Step 5: Update email notification** Open the "Send a message" node and replace `[email protected]` with your email address. **Step 6: Create the editing subworkflow** The workflow references a separate subworkflow for the editing pipeline. Create a new workflow in n8n, copy all nodes from the "EDITING" section (between the Execute Workflow Trigger and the final output), and save it. Note the workflow ID from the URL. **Step 7: Link the subworkflow** In the main workflow, open the "Call subworkflow" node and update the workflow ID to match your newly created editing workflow. **Step 8: Test with a short video** Start with a 5-10 minute YouTube video for your first test. Use the manual trigger or form submission. Monitor the execution to ensure all nodes complete successfully and clips appear in `/data/clips/`. **Step 9: Adjust performance settings** Based on your system's performance during the test, modify the Wait node durations. Systems with 8GB+ RAM and modern CPUs can reduce wait times to 30 seconds. Limited systems should keep 60-second waits or increase them. ## How to customize the workflow **Adjust clip quantity and quality thresholds** Open the "filter out top clips according to score" node. The code currently uses `.slice(0, 10)` to select the top 10 clips. Change this number based on your needs: use `.slice(0, 5)` for only the best clips, or `.slice(0, 20)` for more options. You can also add score filtering by adding `results.filter(c => c.score > 0.7)` before the slice operation to only include clips with virality scores above 70%. **Customize subtitle appearance** Navigate to the "calculate relative subtitle size" node. The JavaScript code defines several styling variables you can modify: - `fontSize` - Currently calculated dynamically, but you can hardcode it: `const fontSize = 48;` - `fontName` - Change from Arial to any system font: `const fontName = 'Impact';` - `primaryColor` - Modify text color using BGR hex format: `'&H00FF00&'` for green, `'&HFF0000&'` for red - `borderColor` - Adjust outline color for better contrast - `outlineWidth` - Increase from 1 to 2 or 3 for thicker borders - `marginV` - Control vertical position (higher values move text up from bottom) **Modify AI analysis prompts** In the "viral clips identification" node, edit the Gemini prompt to target specific content types. For educational content, add "Focus on key teaching moments and actionable tips." For entertainment, emphasize "Identify funny moments, reactions, and unexpected events." For podcast clips, specify "Extract controversial opinions, storytelling segments, and quotable statements." **Change aspect ratios** The workflow defaults to 9:16 for vertical video. To create horizontal clips for YouTube or other platforms, open the "Analyze the actual whole video" node and change the aspect ratio in the JSON schema from `"aspect_ratio": "9:16"` to `"aspect_ratio": "16:9"`. The AI will automatically adjust cropping coordinates accordingly. **Enable audio normalization** By default, audio normalization is disabled for faster processing. To enable it, open the "extract all actionable operations" node, find the audio_normalize task object, and change `enabled: false` to `enabled: true`. This ensures consistent volume levels across all clips but adds processing time. **Add custom editing operations** The editing pipeline is modular. You can add new operations like: - Color grading by inserting FFmpeg color filters - Logo overlays by adding watermark commands - Intro/outro sequences by concatenating video files - Background music by mixing audio tracks Add these as new task objects in the "extract all actionable operations" node following the existing pattern. **Customize notification content** Open the "Send a message" node to modify the email subject, body text, or add clip details. You can include clip metadata like timestamps, scores, and descriptions using expressions like `{{ $json.hook }}` or `{{ $json.score }}`. **Integrate with cloud storage** Add nodes after clip generation to automatically upload finished clips to Google Drive, Dropbox, AWS S3, or any n8n-supported storage service. Use the Loop Over Items1 output to access completed clip file paths. **Schedule automated processing** Replace the Form Trigger with a Schedule Trigger to automatically process videos from a spreadsheet or RSS feed. Combine with Google Sheets integration to maintain a queue of videos to process overnight.

H
Habeeb Mohammed
Content Creation
8 Dec 2025
1523
0
Workflow preview: Voice appointment booking & confirmation system with Vapi, Gemini & Google Calendar
Free intermediate

Voice appointment booking & confirmation system with Vapi, Gemini & Google Calendar

![Workflow Overview](https://raw.githubusercontent.com/Habeeb-MD-Faiz/n8n/main/images/workflow2.jpg) # AI Voice Appointment Booking with Vapi and Google Calendar Build an intelligent appointment booking system that lets customers schedule appointments through natural voice conversations. This workflow connects Vapi AI assistant with Google Calendar to check availability, create appointments, and send professional confirmation emails automatically. ## Who's It For Healthcare providers, consultants, service businesses, coaches, salons, or any business that schedules appointments and wants to automate booking through voice calls. ## What It Does This workflow creates two powerful tools for your Vapi voice assistant: **Availability Checker**: When customers ask about available time slots, the assistant calls this workflow which fetches busy times from Google Calendar, processes them through an AI agent, and returns open slots in natural language. **Appointment Creator**: Once the customer confirms their preferred time, the assistant triggers this workflow to create the calendar event and send a branded confirmation email with all appointment details. The entire booking process happens conversationally without requiring customers to navigate websites or apps. ## How It Works **Availability Flow**: 1. Customer asks Vapi assistant to check availability for a specific date 2. Vapi calls the first webhook with the requested date 3. Workflow queries Google Calendar for busy slots that day 4. JavaScript code formats the busy times into readable text 5. AI agent analyzes the schedule and identifies available time windows 6. Available slots are returned to Vapi in natural language 7. Assistant presents options to the customer **Booking Flow**: 1. Customer confirms their chosen appointment time and provides details 2. Vapi calls the second webhook with name, email, date/time, and appointment type 3. Workflow creates the calendar event in Google Calendar 4. Professional HTML confirmation email is sent via Gmail 5. Success confirmation is returned to Vapi 6. Assistant confirms the booking to the customer ## Requirements - **Vapi account** with a configured voice assistant - **Google Calendar** for appointment management - **Gmail account** for sending confirmation emails - **Google Gemini API key** for availability analysis ## How to Set Up **1. Activate the Workflow** Import this template and activate it to generate the two webhook URLs. **2. Configure Google Calendar** In both calendar nodes, select your appointment calendar and set your timezone. **3. Connect Gmail** Add your Gmail credentials to the email node and customize the confirmation email template with your branding. **4. Set Business Hours** In the Availability Checker AI agent node, update the system message to reflect your operating hours. **5. Create Vapi Tools** In your Vapi assistant dashboard, add two server tools: Tool 1: availability_checker - Function name: `availability_checker` - Description: "Checks available appointment slots for a specific date" - Server URL: Your first webhook URL - Parameters: `date` (string, required, ISO 8601 format) Tool 2: Creating_the_appointment_and_sending_the_confirmation_email - Function name: `Creating_the_appointment_and_sending_the_confirmation_email` - Description: "Creates appointment and sends confirmation email" - Server URL: Your second webhook URL - Parameters: `Name`, `Email`, `date and time`, `Appointment type` (all strings, all required) **6. Update Assistant Prompt** Ensure your Vapi assistant knows when to call each tool based on customer requests. ## Vapi Configuration Download the complete Vapi assistant configuration: [vapi-config.json](https://raw.githubusercontent.com/Habeeb-MD-Faiz/n8n/refs/heads/main/templates/VAPI-agent-config.json) **7. Test End-to-End** Call your Vapi assistant and test the complete booking flow. ## How to Customize **Appointment Duration**: Change the 30-minute default in the "Create an event" node by modifying the `.plus(30, 'mins')` expression. **Email Template**: Edit the HTML in the "Send confirmation email" node to match your brand colors, logo, and messaging. **Business Hours**: Update the system message in the "Availability checker" AI agent node to reflect when you accept appointments. **Timezone**: Ensure both Google Calendar nodes use your correct timezone for accurate scheduling. **Calendar Selection**: Point both calendar nodes to the same Google Calendar to avoid double-bookings. **Appointment Types**: Customize the event description format in the "Create an event" node to include relevant details for your business. This workflow transforms appointment scheduling from a manual back-and-forth into an automated, professional experience that runs 24/7 through voice conversations.

H
Habeeb Mohammed
Support Chatbot
17 Nov 2025
1170
0
Workflow preview: Track personal finances in Google Sheets with AI agent via Slack
Free advanced

Track personal finances in Google Sheets with AI agent via Slack

![Workflow Overview](https://raw.githubusercontent.com/Habeeb-MD-Faiz/n8n/refs/heads/main/images/image.png) ## Who's it for This workflow is perfect for individuals who want to maintain detailed financial records without the overhead of complex budgeting apps. If you prefer natural language over data entry forms and want an AI assistant to handle the bookkeeping, this template is for you. It's especially useful for: - People who want to track cash and online transactions separately - Anyone who lends money to friends/family and needs debt tracking - Users comfortable with Slack as their primary interface - Those who prefer conversational interactions over manual spreadsheet updates ## What it does This AI-powered finance tracker transforms your Slack workspace into a personal finance command center. Simply mention your bot with transactions in plain English (e.g., "₹500 cash food, borrowed ₹1000 from John"), and the AI agent will: 1. **Parse transactions** using natural language understanding via Google Gemini 2. **Calculate balance changes** for cash and online accounts 3. **Show a preview** of changes before saving anything 4. **Update Google Sheets** only after you approve 5. **Track debts** (who owes you, who you owe, repayments) 6. **Send daily reminders** at 11 PM with current balances and active debts The workflow maintains conversational context using PostgreSQL memory, so you can say things like "yesterday's transactions" or "that payment to Sarah" and it understands the context. ## How it works ### Scheduled Daily Check-in (11 PM) - Fetches current balances from Google Sheets - Retrieves all active debts - Formats and sends a Slack message with balance summary - Prompts you to share the day's transactions ### AI Agent Transaction Processing When you mention the bot in Slack: **Phase 1: Parse & Analyze** - Extracts amount, payment type (cash/online), category (food, travel, etc.) - Identifies transaction type (expense, income, borrowed, lent, repaid) - Stores conversation context in PostgreSQL memory **Phase 2: Calculate & Preview** - Reads current balances from Google Sheets - Calculates new balances based on transactions - Shows formatted preview with projected changes - Waits for your approval ("yes"/"no") **Phase 3: Update Database** (only after approval) - Logs transactions with unique IDs and timestamps - Updates debt records with person names and status - Recalculates and stores new balances - Handles debt lifecycle (Active → Settled) **Phase 4: Confirmation** - Sends success message with updated balances - Shows active debts summary - Includes logging timestamp ## Requirements **Essential Services:** - n8n instance (self-hosted or cloud) - Slack workspace with admin access - Google account - Google Gemini API key - PostgreSQL database **Recommended:** - Claude AI model (mentioned in workflow notes as better alternative to Gemini) ## How to set up ### 1. Google Sheets Setup Create a new Google Sheet with **three tabs** named exactly: **Balances Tab:** | Date | Cash_Balance | Online_Balance | Total_Balance | |------|--------------|----------------|---------------| **Transactions Tab:** | Transaction_ID | Date | Time | Amount | Payment_Type | Category | Transaction_Type | Person_Name | Description | Added_At | |----------------|------|------|--------|--------------|----------|------------------|-------------|-------------|----------| **Debts Tab:** | Person_Name | Amount | Type | Date_created | Status | Notes | |-------------|--------|------|--------------|--------|-------| Add header rows and one initial balance row in the Balances tab with today's date and starting amounts. ### 2. Slack App Setup 1. Go to [api.slack.com/apps](https://api.slack.com/apps) and create a new app 2. Under **OAuth & Permissions**, add these Bot Token Scopes: - `app_mentions:read` - `chat:write` - `channels:read` 3. Install the app to your workspace 4. Copy the **Bot User OAuth Token** 5. Create a dedicated channel (e.g., `#personal-finance-tracker`) 6. Invite your bot to the channel ### 3. Google Gemini API 1. Visit [ai.google.dev](https://ai.google.dev) 2. Create an API key 3. Save it for n8n credentials setup ### 4. PostgreSQL Database Set up a PostgreSQL database (you can use [Supabase](https://supabase.com) free tier): 1. Create a new project 2. Note down connection details (host, port, database name, user, password) 3. The workflow will auto-create the required table ### 5. n8n Workflow Configuration **Import the workflow** and configure: **A. Credentials** - **Google Sheets OAuth2**: Connect your Google account - **Slack API**: Add your Bot User OAuth Token - **Google Gemini API**: Add your API key - **PostgreSQL**: Add database connection details **B. Update Node Parameters** 1. **All Google Sheets nodes**: Select your finance spreadsheet 2. **Slack nodes**: Select your finance channel 3. **Schedule Trigger**: Adjust time if you prefer a different check-in hour (default: 11 PM) 4. **Postgres Chat Memory**: - Change `sessionKey` to something unique (e.g., `finance_tracker_your_name`) - Keep `tableName` as `n8n_chat_history_finance` or rename consistently **C. Slack Trigger Setup** 1. Activate the "Bot Mention trigger" node 2. Copy the webhook URL from n8n 3. In Slack App settings, go to **Event Subscriptions** 4. Enable events and paste the webhook URL 5. Subscribe to bot event: `app_mention` 6. Save changes ### 6. Test the Workflow 1. Activate both workflow branches (scheduled and agent) 2. In your Slack channel, mention the bot: `@YourBot ₹100 cash snacks` 3. Bot should respond with a preview 4. Reply "yes" to approve 5. Verify Google Sheets are updated ## How to customize ### Change Transaction Categories Edit the AI Agent's system message to add/remove categories. Current categories: - travel, food, entertainment, utilities, shopping, health, education, other ### Modify Daily Check-in Time Change the Schedule Trigger's `triggerAtHour` value (0-23 in 24-hour format). ### Add Currency Support Replace `₹` with your currency symbol in: - Format Daily Message code node - AI Agent system prompt examples ### Switch AI Models The workflow uses Google Gemini, but notes recommend Claude. To switch: 1. Replace "Google Gemini Chat Model" node 2. Add Claude credentials 3. Connect to AI Agent node ### Customize Debt Types Modify AI Agent's system prompt to change debt handling logic: - Currently: `I_Owe` and `They_Owe_Me` - You can add more types or change naming ### Add More Payment Methods Current: cash, online To add more (e.g., credit card): - Update AI Agent prompt - Modify Balances sheet structure - Update balance calculation logic ### Change Approval Keywords Edit AI Agent's Phase 2 approval logic to recognize different approval phrases. ### Add Spending Analytics Extend the daily check-in to calculate: - Weekly/monthly spending summaries - Category-wise breakdowns - Use additional Code nodes to process transaction history ## Important Notes ⚠️ **Never trigger with normal messages** - Only use app mentions (@botname) to avoid infinite loops where the bot replies to its own messages. 💡 **Context Awareness** - The bot remembers conversation history, so you can reference "yesterday", "last week", or previous transactions naturally. 🔒 **Data Privacy** - All your financial data stays in your Google Sheets and PostgreSQL database. The AI only processes transaction text temporarily. 📊 **Backup Regularly** - Export your Google Sheets periodically as backup. --- **Pro Tips:** - Start with small test transactions to ensure everything works - Use consistent person names for debt tracking - The bot understands various formats: "₹500 cash food" = "paid 500 rupees in cash for food" - You can batch transactions in one message: "₹100 travel, ₹200 food, ₹50 snacks"

H
Habeeb Mohammed
Personal Productivity
23 Oct 2025
407
0