by Alexandru Burca
Daily News Digest Video Generator for YouTube Shorts Instalations Instructions Youtube Instalation Instructions Overview This workflow automatically creates and publishes daily news digest videos from WordPress articles to YouTube. It runs every evening at 7 PM, compiling the day's top stories from a news portal into a professionally formatted vertical video (1080x1920px) optimized for social media platforms like YouTube Shorts. What It Does 1. π Scheduled Trigger Runs automatically every day at 19:00 (7 PM) 2. π° Fetches Today's Articles Retrieves all published WordPress posts from the current day 3. β Validates Content Ensures there are at least 3 articles before proceeding 4. π¬ Video Detection Scans article content HTML for embedded videos Extracts MP4 URLs from WordPress video players Parses wp-playlist-script JSON data Falls back to ` and <source>` tag detection 5. π§Ή Data Processing Extracts** article titles, links, and featured media IDs Decodes HTML entities**: Converts – to β, " to ", etc. Fetches featured images** from WordPress Media API Assigns default images** for articles without featured media Calculates reading time** per article (3-7 seconds based on word count) Cleans text**: Removes HTML tags and normalizes whitespace 6. π₯ Video Generation (via Shotstack API) Intro Slide (3 seconds) Black background Large logo (centered) Title on center Current date in DD-MM-YYYY format News Slides (3-7 seconds each) Each article is displayed with: Background**: Video (if available) or featured image, cropped to fit Dark overlay**: 40% opacity black layer for text readability Article headline**: Large white text at top Small logo**: Top-right corner Pagination counter**: Bottom-right white badge (e.g., "1 / 22") CTA button**: Centered CTA Background music**: Subtle looped audio track Transitions**: Smooth fade in/out between slides Outro Slide (3 seconds) Identical to intro slide Provides clean ending to the video 7. β³ Processing Wait Waits 30 seconds for Shotstack to render the video Polls Shotstack API to verify video completion 8. π₯ Download Video Retrieves the finished MP4 file from Shotstack Downloads video data for YouTube upload 9. π€ YouTube Upload Automatically uploads to YouTube with: Title**: "Daily Digest - [Day] [Weekday], [Year]" Description**: Same as title Category**: News & Politics Made for kids**: Yes Tags**: dailydigest β¨ Key Features Intelligent Content Handling β Automatic video/image detection and intelligent media selection β Dynamic reading time calculation for optimal viewer engagement β HTML entity cleaning for proper text display (WordPress compatibility) β Fallback default images for articles without media β Video background support with automatic muting Professional Video Production β Vertical format optimized for mobile viewing (1080x1920px) β Professional branding with logos and consistent styling β Smooth fade transitions between slides β Background music with looping support β Dynamic pagination counters β Call-to-action buttons for engagement Customization β Centralized variables for easy branding updates β Configurable logos, colors, and text β Adjustable reading time calculation β Flexible date formatting β Customizable audio track π― Use Cases Perfect for: π° News websites wanting to repurpose daily articles π± Media outlets creating social media content π₯ Content creators automating video production π Publishers maximizing content distribution π Marketing teams driving traffic from social platforms π§ Customization Options Easy Changes Update logos by changing logo_big and logo_small URLs Modify branding colors via button_bg_color variable Adjust button text with button_text variable Change video title with daily_digest_text variable Update background music by replacing audio URL Advanced Customization Adjust reading time formula in calculateReadingTime() function Modify date format in getRomanianDate() function Change video dimensions (currently 1080x1920) Update font family and sizes Adjust overlay opacity and colors Modify transition effects π Prerequisites Required Credentials WordPress API - Access your WordPress site Shotstack API - API key for video rendering (Stage environment) YouTube OAuth2 - Authenticated YouTube account for uploads
by Cheng Siong Chin
Introduction Generates complete scientific papers from title and abstract using AI. Designed for researchers, automating literature search, content generation, and citation formatting. How It Works Extracts input, searches academic databases (CrossRef, Semantic Scholar, OpenAlex), merges sources, processes citations, generates AI sections (Introduction, Literature Review, Methodology, Results, Discussion, Conclusion), compiles document. Workflow Template Webhook β Extract Data β Search (CrossRef + Semantic Scholar + OpenAlex) β Merge Sources β Process References β Prepare Context β AI Generate (Introduction + Literature Review + Methodology + Results + Discussion + Conclusion via OpenAI) β Merge Sections β Compile Document Workflow Steps Input & Search: Webhook receives title/abstract; searches CrossRef, Semantic Scholar, OpenAlex; merges and processes references AI Generation: OpenAI generates six sections with in-text citations using retrieved references Assembly: Merges sections; compiles formatted document with reference list Setup Instructions Trigger & APIs: Configure webhook URL; add OpenAI API key; customize prompts Databases: Set up CrossRef, Semantic Scholar, OpenAlex API access; configure search parameters Prerequisites OpenAI API, CrossRef API, Semantic Scholar API, OpenAlex API, webhook platform, n8n instance Customization Adjust reference limits, modify prompts for research fields, add citation styles (APA/IEEE), integrate databases (PubMed, arXiv), customize outputs (DOCX/LaTeX/PDF) Benefits Automates paper drafting, comprehensive literature integration, proper citations
by MUHAMMAD SHAHEER
Whoβs it for This template is designed for creators, researchers, freelance writers, founders, and automation professionals who want a reliable way to generate structured, citation-backed research content without doing manual data collection. Anyone creating blog posts, reports, briefs, or research summaries will benefit from this system. What it does This workflow turns a simple form submission into a complete research pipeline. It accepts a topic, determines what needs to be researched, gathers information from the web, writes content, fact-checks it against the collected sources, edits the draft for clarity, and compiles a final report. It behaves like a small agentic research team inside n8n. How it works A form collects the research topic, depth, and desired output format. A research agent generates focused search queries. SERP API retrieves real-time results for each query. The workflow aggregates and structures all findings. A writing agent creates the first draft based on the data. A fact-checking agent verifies statements against the sources. An editor agent improves tone, flow, and structure. A final review agent produces the completed research document with citations. This workflow includes annotated sticky notes to explain each step and guide configuration. Requirements Groq API key for running the Llama 3.3 model. SERP API key for performing web searches. An n8n instance (cloud or self-hosted). No additional dependencies are required. How to set up Add your Groq and SERP API credentials using n8nβs credential manager. Update the form fields if you want custom depth or output formats. Follow the sticky notes for detailed configuration. Run the workflow and submit a topic through the form to generate your first research report. How to customize Replace the writer agent with a different model if you prefer a specific writing style. Adjust the number of search queries or SERP results for deeper research. Add additional steps such as PDF generation, sending outputs to Notion, or publishing to WordPress. Modify the form to suit industry-specific content needs.
by Akash Narayan
Quick overview This workflow ingests a local document file, splits it into chunks, generates embeddings with Ollama (nomic-embed-text), and stores the vectors in a Qdrant collection for on-prem RAG indexing. How it works Runs manually when you click Execute workflow in n8n. Reads a document from disk from the n8n host/container file system. Extracts text content from the file (configured for PDF extraction). Splits the extracted text into overlapping chunks using a recursive character splitter. Generates embeddings for each chunk with Ollama using the nomic-embed-text model. Inserts the chunk texts and their embeddings into a specified Qdrant collection. Setup Self-host n8n with a mounted volume and update the file path to a container-accessible path in the Read/Write Files from Disk step. Run Ollama locally, pull the nomic-embed-text model, and add an Ollama credential in n8n pointing to your Ollama instance. Set up a Qdrant instance, create a Qdrant API credential in n8n (URL and API key), and set the target collection name (for example, handbook) in the Qdrant step. Requirements Self-hosted n8n (Docker or npm-based) this workflow will not run on n8n Cloud, since it depends on the local-filesystem "Read/Write Files from Disk" node. Ollama installed and running locally, with the nomic-embed-text model pulled (ollama pull nomic-embed-text). A Qdrant instance (local or cloud) with a URL and API key you can register as an n8n credential. A document file (PDF by default; swap the extraction node's operation for other formats) accessible on the n8n host/container filesystem. Customization Swap the embedding model by changing the Ollama credential/model name to a different local embedding model. Point the "Extract from File" node at a different format (DOCX, CSV, HTML) instead of PDF. Adjust chunk size/overlap on the Recursive Character Text Splitter for longer or shorter context windows. Swap Qdrant for another n8n-supported vector store if you'd rather not self-host Qdrant. Replace the manual trigger with a Schedule Trigger or Webhook to automate ingestion of new files as they arrive. Additional info Pairs with a companion template, "Local RAG Query Chatbot," which queries the same Qdrant collection this workflow populates β run this Indexer first, then use that template to ask questions about the indexed content. Runs entirely on local models (Ollama + Qdrant), so there's no per-query API cost once set up. Known limitation: retrieval quality on the companion query template depends on the Vector Store Retriever's Top K setting. With the default value, questions needing multiple facts at once may retrieve an incomplete set of chunks, and the assistant will correctly decline rather than guess. Increase Top K on the retriever node if you need broader recall.
by Pawan
Who's it for? This template is perfect for educational institutions, coaching centers (like UPSC, GMAT, or specialized technical training), internal corporate knowledge bases, and SaaS companies that need to provide instant, accurate, and source-grounded answers based on proprietary documents. It's designed for users who want to leverage Google Gemini's powerful reasoning but ensure its answers are strictly factual and based only on their verified knowledge repository. How it works / What it does This workflow establishes a Retrieval-Augmented Generation (RAG) pipeline to build a secure, fact-based AI Agent. It operates in two main phases: 1. Knowledge Ingestion: When a new document (e.g., a PDF, lecture notes, or policy manual) is uploaded via a form or Google Drive, the Embeddings Google Gemini node converts the content into numerical vectors. These vectors are then stored in a secure MongoDB Atlas Vector Store, creating a private knowledge base. 2. AI Query & Response: A user asks a question via Telegram. The AI Agent uses the question to perform a semantic search on the MongoDB Vector Store, retrieving the most relevant, source-specific passages. It then feeds this retrieved context to the Google Gemini Chat Model to generate a precise, factual answer, which is sent back to the user on Telegram. This process ensures the agent never "hallucinates" or uses general internet knowledge, making the responses accurate and trustworthy. Requirements To use this template, you will need the following accounts and credentials: n8n Account Google Gemini API Key: For generating vector embeddings and powering the AI Agent. MongoDB Atlas Cluster: A free-tier cluster is sufficient, configured with a Vector Search index. Telegram Bot: A bot created via BotFather and a Chat ID where the bot will listen for and send messages. Google Drive Credentials (if using the Google Drive ingestion path). How to set up Set up MongoDB Atlas:** Create a free cluster and a database. Create a Vector Search Index on your collection to enable efficient searching. Configure Ingestion Path:** Set up the Webhook trigger for your "On form submission" or connect your Google Drive credentials. Configure the Embeddings Google Gemini node with your API Key. Connect the MongoDB Atlas Vector Store node with your database credentials, collection name, and index name. Configure Chat Path:** Set up the Telegram Trigger with your Bot Token to listen for incoming messages. Configure the Google Gemini Chat Model with your API Key. Connect the MongoDB Atlas Vector Store 1 node as a Tool within the AI Agent. Ensure it points to the same vector store as the ingestion path. Final Step:* Configure the Send a text message node with your *Telegram Bot Token and the Chat ID**. How to customize the workflow Change Knowledge Source:** Replace the Google Drive nodes with nodes for Notion, SharePoint, Zendesk, or another document source. Change Chat Platform:** Replace the Telegram nodes with a Slack, Discord, or WhatsApp Cloud trigger and response node. Refine the Agent's Persona:** Open the AI Agent node and edit the System Instruction to give the bot a specific role (e.g., "You are a senior UPSC coach. Answer questions politely and cite sources."). π‘ Example Use Case An UPSC/JEE/NEET coaching uploads NCERT summaries and previous year notes to Google Drive. Students ask questions in the Telegram group β the bot instantly replies with contextually accurate answers from the uploaded materials. The same agent can generate daily quizzes or concise notes from this curated content automatically.
by Jaruphat J.
β οΈ Note: All sensitive credentials should be set via n8n Credentials or environment variables. Do not hardcode API keys in nodes. Whoβs it for Marketers, creators, and automation builders who want to generate UGC-style ad images and short videos automatically from a Google Sheet. Ideal for eβcommerce SKUs, agencies, or teams that need many variations quickly. What it does (Overview) This template turns a spreadsheet row into ad images and optionally 5β8s videos. Zone 0 β Image-only pipeline (Gemini/OpenRouter)**: Creates an ad image from a product link and prompt, uploads it to Drive, and updates the sheet (no video step). Zone 1 β Create image (Fal nanoβbanana) + prepare for video**: Generates an image via Fal.ai, polls status, fetches URL, then analyzes the image with LLM to prepare scene prompts. Zone 2 β Generate video (WAN2.2 & Veo3)**: Uses the generated image + structured scene prompts to create short clips, uploads them to Drive, and writes the video URL back to the sheet. Requirements Fal.ai API key** (env: FAL_KEY) Google Sheets / Google Drive** OAuth2 credentials OpenAI / Gemini (via OpenRouter)** for image analysis or alternative image generation A Google Sheet with columns, e.g.: product | presenter | prompt | img_url | video_url Google Drive files set to Anyone with link β Viewer so APIs can fetch them How to set up Credentials: Add Google Sheets + Google Drive (OAuth2), Fal.ai (Header Auth with Authorization: Key {{$env.FAL_KEY}}), and OpenAI/OpenRouter. Google Sheet: Create the columns above. Paste product image Drive links (the workflow converts them to direct links automatically). Import the workflow: Use the provided JSON. Confirm node credentials resolve. Run: Start with Zone 0 to verify image-only flow, then test Zone 1 + Zone 2 for full imageβvideo. Zone 0 β Create Ad Image (Image-only) This path is for creating just an image and stopping. It reads the Gemini tab in the Sheet, generates an image via OpenRouter/Gemini, converts base64 to a file, uploads to Drive, and writes back img_url. Key nodes Get Data1 (Google Sheets)** β reads Gemini tab setImgeURL (Set)** β converts Drive URLs to direct (uc?export=view&id=...) CreateImagebyOpernRouter (Gemini)** β calls google/gemini-2.5-flash-image-preview:free wait20sec (Wait)** β small delay setBase64data (Code)** β splits data URI into { data, mimeType, fileName } Convert to File** β creates binary uploadImagetoGdrive (Google Drive)** β uploads image updateImageURL (Google Sheets)** β writes back img_url Zone 1 β Create Image (Fal nanoβbanana) + Prepare for Video Reads product rows, normalizes Drive links, generates image with Fal nanoβbanana, polls until complete, fetches the output image URL, then runs an image analysis (OpenAI Vision) to prepare structured text for the video step. Key nodes Get Data (Google Sheets)** β reads nanoBanana tab Edit Fields (Set)** β converts Drive links to direct (uc?export=view&id=...) Call Fal.ai API (nanoBanana)** β POST https://queue.fal.run/fal-ai/nano-banana/edit Get image status / If / Wait / Get the image** β job polling until complete Analyze image (OpenAI Vision)** β returns structured description (brand text, colors, type, short description) Zone 2 β Generate Video (WAN2.2 & Veo3) Creates a 5β8s UGC clip using the generated image + structured scene prompt. Key nodes Describe Each Scene for Video (AI Agent)** β expands analysis + user intent into detailed scene sections (Characters, Scene Background, Camera Movement, Movement in Scene, Sound Design) Structured Output Parser2 (Schema)** β enforces consistent JSON structure Veo3 (HTTP)** β POST /fal-ai/veo3/image-to-video with prompt + image_url Call Fal.ai API (WAN2.2) [Optional]** β POST /fal-ai/wan/v2.2-a14b/image-to-video Wait for the video / Get the video status / Video status / Get the video** β polling loop HTTP Request (Download File)** β downloads MP4 uploadImagetoGdrive1 (Google Drive)** β uploads video updateVideoURL (Google Sheets)** β writes back video_url Node settings (highβlevel) Drive Link Parser (Set)** {{ (() => { const u = $json.product || ''; const q = u.match(/[?&]id=([-\w]{25,})/); const d = u.match(/\/d\/([-\w]{25,})/); const any = u.match(/[-\w]{25,}/); const id = q?.[1] || d?.[1] || (any ? any[0] : ''); return id ? 'https://drive.google.com/uc?export=view&id=' + id : ''; })() }} How to customize the workflow Adjust AI prompts to change ad style (funny, luxury, cozy, techy). Change video aspect ratio for TikTok/IG/Shorts (9:16, 1:1, 16:9). Extend Sheet schema for campaign labels, audiences, hashtags. Add distribution (Slack/LINE/Telegram) after Drive upload. Troubleshooting JSON parameter needs to be valid JSON** β Ensure expressions return objects, not strings. 403 on images** β Make Drive files public (Viewer) and convert links. Video never completes* β Check status_url, retry with -fast models or offβpeak times. Template metadata Uses:** Google Sheets, Google Drive, HTTP Request, Wait/If/Switch, Code, Convert to File, OpenAI/Gemini (optional), Fal.ai models (nanoβbanana, WAN2.2, Veo3) Source workflow JSON:** Gemini\_NanoBanana\_Template.json (node names and connections match) Product Image Product Image - nano Banana Product Video - Veo3 Product Video - Wan2.2
by Ilyass Kanissi
π€ Simple RAG Customer Support Chatbot π Overview This intelligent customer support chatbot leverages Retrieval-Augmented Generation (RAG) to provide accurate, contextual responses by combining your knowledge base with AI capabilities. The system automatically retrieves relevant documents from your Pinecone vector store and uses them to generate informed responses through OpenAI's language models. β‘ Quick Setup Import Workflow Import this workflow template into your n8n instance Configure Credentials Add the following API credentials: OpenAI API Key: For chat completions and embeddings Pinecone API Key: For vector database operations Google Drive: For document auto ingestion Initialize Vector Store Use the "Insert documents into Pinecone" workflow to populate your knowledge base Activate Workflow Enable the main chat workflow to start receiving requests π§ How it Works Main Chat Flow (Agent Workflow) User Message β Memory Retrieval β Vector Search β Context Assembly β AI Response β Memory Update β Response Process Flow: Message Reception: Webhook receives user chat messages with session management Memory Retrieval: Loads conversation history for context continuity Semantic Search: Queries Pinecone vector store for relevant documents Context Assembly: Combines retrieved documents with conversation history AI Generation: OpenAI generates contextual response using assembled context Memory Storage: Updates conversation memory for future interactions Response Delivery: Returns formatted response to user interface Document Ingestion Flow Document Source β Text Extraction β Chunking β Embedding β Vector Storage Process Flow: Document Trigger: Google Drive or manual file upload detection Content Extraction: Extracts text from various file formats (PDF, DOC, TXT) Text Chunking: Splits documents into optimal chunks for embedding Embedding Generation: Creates vector embeddings using OpenAI Vector Storage: Stores embeddings in Pinecone with metadata Index Update: Updates search index for immediate availability
by Anirudh Aeran
This template creates a comprehensive, production-ready Retrieval-Augmented Generation (RAG) system. It builds a sophisticated AI agent that can answer questions based on documents stored in a specific Google Drive folder, and it automatically keeps its knowledge base up-to-date as you add, update, or remove files. Whoβs it for? This workflow is perfect for developers, businesses, and AI agencies looking to: Create an internal knowledge base chatbot for employees (e.g., for HR policies, technical documentation, or project information). Build an intelligent support agent that uses your company's official documents as its source of truth. Develop advanced AI solutions for clients that require a self-maintaining knowledge base. How it works? This workflow is divided into three distinct, powerful systems: The RAG Agent: This is the core chatbot. It receives a user's question, uses a Supabase Vector Store to find the most relevant document snippets, leverages a Cohere Reranker to improve accuracy, and uses a Postgres database to maintain conversation history (memory). It then uses Google Gemini to generate a final, context-aware answer. The Ingestion Pipeline: This system automates the process of learning new information. It triggers whenever a file is created or updated in your designated Google Drive folder. It intelligently detects the file type (Google Doc or PDF), extracts the text, splits it into manageable chunks, generates embeddings using Gemini, and stores them in your Supabase vector database. The Cleanup System: To ensure your knowledge base remains accurate, a scheduled process runs periodically to find and remove data from Supabase that corresponds to files that have been deleted from the Google Drive folder. This prevents the agent from using outdated information. How to set up To get this workflow running, you will need to configure the following: Credentials: Connect your accounts in the n8n credential manager for: Google Drive (OAuth2) Supabase (API Key) Postgres Google Gemini (API Key from Google AI Studio) Cohere (API Key) Google Drive Folder: In the Search files and folders node, replace the placeholder folder ID with the ID of the Google Drive folder you want to monitor. Database Setup: Ensure your Supabase and Postgres instances are set up with the necessary tables. You'll need a documents table in Supabase for the vectors and a document_metadata table in Postgres. How to customize the workflow This template is a powerful starting point. You can easily customize it by: Swapping out the LLM (e.g., use OpenAI or Anthropic instead of Gemini). Changing the vector database (e.g., Pinecone, Weaviate). Adding more data sources, such as Notion, Slack, or websites.
by Mohan Lal Dhanwani
Quick overview This workflow collects a video topic via an n8n form, uses Groq to generate a short-form video idea and Veo 3 prompt, logs the content to Google Sheets, generates the video through Vertex AI (Veo 3), uploads it to Google Drive, and writes the Drive URL to the sheet. How it works Receives a submission from an n8n form with a topic, desired vibe, and target audience. Uses Groq (llama-3.3-70b-versatile) to generate a structured video concept (caption, idea, environment, status) and then expands it into a detailed cinematic prompt for Google Veo 3. Appends the generated idea, caption, environment, status, and prompt to a Google Sheets content log. Submits the prompt to Google Veo 3 via the Vertex AI REST API and polls the long-running operation until the generation reports it is done. If the Veo 3 response returns an API error, waits and retries the full generation up to five times before stopping. Converts the returned base64 video into an MP4 file, uploads it to Google Drive, and updates Google Sheets with the Drive webViewLink matched by the prompt. Setup Add Groq API credential and select it in the Groq Chat Model used by the idea and prompt generation steps. Create a Google Sheet with columns like Idea, Captions, Environment, Status, Prompt, and Video URL, then replace YOUR_GOOGLE_SHEET_ID and set the target sheet name. Add a Google Service Account credential with Vertex AI access, enable the Veo API in your GCP project, and replace YOUR_GCP_PROJECT_ID in both Vertex AI HTTP request URLs. Add a Google Drive OAuth2 credential and replace YOUR_DRIVE_FOLDER_ID with the folder where the generated MP4s should be uploaded. Publish the n8n form (or use the test URL) and share it with users who should be able to submit video requests.
by Ravi Patel
Quick Overview This workflow collects a research query from an n8n form, researches it with Perplexity, drafts and formats an SEO blog post using OpenRouter and Google Gemini, then creates a draft in WordPress, uploads and sets a featured image, and sends a Telegram success message. How it works Receives a research query from an n8n form submission. Sends the query to the Perplexity API and rewrites citation markers into source-linked text. Uses an OpenRouter chat model to draft a long-form, SEO-focused blog post based on the research. Generates a JSON title, slug, and meta description via an OpenRouter-powered agent and parses the structured output. Sends the blog draft to Google Gemini to convert it into WordPress-compatible HTML with a table of contents, FAQ, and styling rules. Aggregates the generated HTML and metadata, cleans the HTML output, and creates a draft post in WordPress. Downloads an image from a configured URL, uploads it to the WordPress Media Library, sets it as the postβs featured image, and notifies a Telegram chat. Setup Create credentials for Perplexity API (HTTP Header Auth) and update the request headers/body as needed for your Perplexity account. Add an OpenRouter API credential for the two OpenRouter chat model connections used to write the draft and generate title/slug/meta. Add a Google Gemini (Google PaLM) API credential for the HTML-generation step. Add WordPress API credentials and update the WordPress site base URL used in the media upload and post update HTTP requests. Create a Telegram bot credential, set the TELEGRAM_CHAT_ID environment variable, and choose the chat where the success message should be sent. Replace the hardcoded image URL (or extend the workflow to generate/select images dynamically) before publishing.
by deAPI Team
Who is this for? Marketing teams who need quick video ads without a production crew E-commerce sellers promoting products on social media Freelancers and agencies producing ad creatives for clients Anyone who wants to turn a product description into a video ad in minutes What problem does this solve? Producing a video ad typically requires a designer for the visuals, a motion artist for animation, and hours of back-and-forth. This workflow replaces that entire pipeline β fill out a form, and get a ready-to-use video ad delivered to your inbox. What this workflow does Collects product name, description, visual style, and recipient email through a web form AI Agent analyzes the product and uses both deAPI Image Prompt Booster and Video Prompt Booster tools to create optimized prompts for image and video generation Generates a 1280x720 landscape product hero image using deAPI Animates the hero image into a short video ad using deAPI image-to-video generation Emails the video ad link to the specified address via Gmail Setup Requirements n8n instance** (self-hosted or n8n Cloud) deAPI account for prompt boosting, image generation, and video generation Anthropic account for the AI Agent Gmail account for email delivery Installing the deAPI Node n8n Cloud: Go to **Settings β Community Nodes and toggle the "Verified Community Nodes" option Self-hosted: Go to **Settings β Community Nodes and install n8n-nodes-deapi Configuration Add your deAPI credentials (API key + webhook secret) Add your Anthropic credentials (API key) Add your Gmail credentials (OAuth2) Ensure your n8n instance is on HTTPS How to customize this workflow Change the AI model**: Swap Anthropic for OpenAI, Google Gemini, or any other LLM provider Adjust the creative direction**: Modify the AI Agent system message to target different ad styles (product demo, lifestyle, teaser, etc.) Change the delivery method**: Replace Gmail with Slack, Microsoft Teams, or upload directly to Google Drive / S3 Change the aspect ratio**: Switch from landscape to square or portrait for Instagram Stories or TikTok Add background removal**: Insert a deAPI Remove Background node before video generation for a clean product cutout Batch processing**: Replace the Form Trigger with a Google Sheets or Airtable trigger to generate ads for a product catalog
by Paul Roussel
Automated workflow that generates custom AI image backgrounds from text prompts using Gemini's Nano Banana (native image generation), removes video backgrounds, and composites videos on AI-generated scenes. Create any background you can imagine without needing stock images. How it works β’ Describe background: Provide video URL and text prompt describing desired background scene (e.g., "modern office with city skyline at golden hour") β’ AI generates image: Gemini creates a background image from your prompt in ~10-20 seconds β’ Upload to Drive: Generated background is saved to Google Drive and made publicly accessible β’ Remove & composite: Video background is removed and composited on AI-generated scene with centered template β’ Save final video: Completed video is uploaded to Google Drive with shareable link Set up steps β±οΈ Total setup time: ~5 minutes β’ Get Gemini API Key (~1 min): Visit https://aistudio.google.com/apikey, create new API key, add to n8n Settings β Variables as GEMINI_KEY β’ Get VideoBGRemover API Key (~2 min): Visit https://videobgremover.com/n8n, sign up, add to n8n as VIDEOBGREMOVER_KEY β’ Connect Google Drive (~2 min): Click "Save Background Image to Drive" node, click "Connect", authorize n8n Use cases: Marketing videos with custom branded environments tailored to your message Product demos with unique AI-generated backgrounds that match your product aesthetic Social media content with creative scenes you can't find in stock libraries AI avatars placed in AI-generated worlds Presentations with custom backgrounds generated for specific topics A/B testing different background variations for the same video Pricing: Gemini: ~$0.03 per generated image VideoBGRemover: $0.50-$2.00 per minute of video Total: ~$0.53-$2.03 per video Triggers: Webhook (for automation) or Manual (for testing) Processing time: Typically 5-7 minutes total Prompt tips: Be descriptive and specific. Instead of "office," try: "A modern minimalist office with floor-to-ceiling windows overlooking a city skyline at golden hour. Warm sunlight, polished concrete floors, sleek wooden desks, green plants."