AI Product Video Generator with Background Removal
Overview
This workflow automates the creation of professional 3D product videos from a simple product photo submission. When a user submits a product photo and title through an n8n form, the workflow removes the background using remove.bg, generates a cinematic rotating product video using the Kling AI video API, and delivers the final result via email. All intermediate and final assets are organized in Google Drive and tracked in a Google Sheet for easy management.
This is particularly useful for e-commerce businesses, marketing teams, or product managers who need to quickly generate high-quality product videos without manual editing. The entire process runs automatically, saving hours of manual work per product.
Workflow Steps
-
On Form Submission (Form Trigger) — No auth. This node provides a web form where users can upload a product photo and enter a product title. The form is titled "Go 2 Market" and collects a file upload and text input.
-
Create Slug (Code Node) — No auth. This JavaScript code generates a URL-friendly slug from the product title by converting it to lowercase, replacing spaces with hyphens, and appending a random 6-character string for uniqueness. The slug is used as the folder name and identifier throughout the workflow.
-
Create folder (Google Drive) — OAuth2. Creates a new folder in Google Drive using the generated slug as the folder name. The folder is created in the root of "My Drive" and will contain all assets for this product.
-
Give Access to folder (Google Drive) — OAuth2. Makes the newly created folder publicly readable by setting the sharing permission to "anyone with the link" as a reader. This ensures the generated video URL can be accessed by the recipient.
-
Get Image File (Code Node) — No auth. Extracts the binary file data from the form submission. This node runs once and processes all uploaded files, preparing them for background removal.
-
Bg remove from image (HTTP Request) — API Key auth (X-API-Key header). Sends the uploaded image to remove.bg API to remove the background. Configured with size "auto" and expects the response as a file, which is stored in the output property "no-bg.png".
-
Upload original image (Google Drive) — OAuth2. Uploads the original product photo to the product's folder in Google Drive.
-
Upload original image in sheet (Google Sheets) — OAuth2. Appends a new row to the Google Sheet with the original image's web view link, the product title from the form, and the slug (folder name). This creates a record of the original submission.
-
Upload Remove BG image (Google Drive) — OAuth2. Uploads the background-removed image to the product's folder in Google Drive, with a filename prefixed by "(no-bg)".
-
Upload Remove BG image in sheet (Google Sheets) — OAuth2. Updates the Google Sheet row (matched by slug) with the background-removed image's web view link.
-
Extract Image ID from URL (Code Node) — No auth. Parses the Google Drive URL of the background-removed image to extract the file ID using a regular expression. This ID is needed for the video generation API.
-
Create video (HTTP Request) — API Key auth (Authorization header with "Key" prefix). Sends a request to the Kling AI video generation API (fal.ai) with a cinematic prompt describing a 360-degree rotating product shot. The image URL is constructed using the extracted file ID and Google Drive's direct download link format.
-
Wait (Wait Node) — No auth. Pauses execution for 40 seconds to allow the video generation process to complete. This is a polling delay before checking the status.
-
Check video status (HTTP Request) — API Key auth (Authorization header). Polls the status URL returned by the video creation API to check if the video is ready.
-
If (IF Node) — No auth. Checks if the video status equals "IN_PROGRESS". If true, it loops back to the Wait node for another 40-second delay. If false (completed), it proceeds to get the video link.
-
Get video link (HTTP Request) — API Key auth (Authorization header). Retrieves the final video URL from the response URL provided by the status check.
-
Convert video link to binary file (HTTP Request) — No auth. Downloads the video from the URL and converts it to a binary file, stored in the output property "Video-file".
-
Upload Video (Google Drive) — OAuth2. Uploads the generated video file to the product's folder in Google Drive.
-
Upload Video Link in Sheet (Google Sheets) — OAuth2. Updates the Google Sheet row (matched by slug) with the video's public URL.
-
Send Mail (Gmail) — OAuth2. Sends an email to a predefined recipient (currently set to [email protected]) with a professional HTML email containing the video link. The email includes a friendly message and a direct link to the video.
Setup Instructions
Required Accounts & Services
- n8n instance (self-hosted or cloud)
- Google Account (for Google Drive and Google Sheets)
- Gmail Account (for sending emails)
- remove.bg Account — Sign up at https://www.remove.bg and get an API key
- Fal.ai Account — Sign up at https://fal.ai and create an API key for the Kling Video model
Credential Configuration
- Google OAuth2 — Create OAuth2 credentials in Google Cloud Console with access to Google Drive, Google Sheets, and Gmail APIs. Configure the n8n Google OAuth2 credential with your client ID and secret.
- remove.bg API Key — Create a new "Header Auth" credential in n8n with the header name "X-API-Key" and your remove.bg API key as the value.
- Fal.ai API Key — Create a new "Header Auth" credential in n8n with the header name "Authorization" and the value "Key YOUR_FAL_API_KEY".
- Gmail OAuth2 — Use the same Google OAuth2 credential or create a separate one for Gmail.
Configuration Steps
- Update the Send Mail node's "Send To" field with your desired recipient email address.
- The Google Sheet ID is hardcoded (18k1Gq2X2J3_cbwJ9XyJoysVuhIpWhgc1cmlTKBnB3Yw). Either use this existing sheet or create your own and update the Document ID in all Google Sheets nodes.
- The video generation prompt can be customized in the Create video node's body parameters.
- Adjust the Wait node's duration if video generation typically takes longer or shorter.
Use Cases & Variations
Primary Use Case
E-commerce businesses can use this workflow to automatically generate product videos for their catalog. Simply submit a product photo through the form, and within a few minutes, receive a professional 3D rotating product video ready for use on product pages, social media, or marketing materials.
Possible Adaptations
- Multi-product batch processing — Modify the form to accept multiple files and loop through each one
- Different video styles — Change the prompt in the Create video node to generate different camera movements or backgrounds
- Social media posting — Add nodes to automatically post the video to Instagram, TikTok, or YouTube
- Watermarking — Add an image processing step to overlay a logo or watermark on the video
- Analytics tracking — Extend the Google Sheet to track which products generate the most engagement
- Notification alternatives — Replace Gmail with Slack, Telegram, or SMS notifications
- Different AI video providers — Swap the Kling AI API for RunwayML, Pika Labs, or other video generation services
Customization Tips
- The form can be embedded on any website using an iframe
- The email template can be customized with your brand colors and logo
- The Google Sheet can be used as a CMS to trigger workflows for specific products
- Add error handling nodes to notify you if video generation fails
Workflow JSON
{
"name": "3D Product Video",
"nodes": [
{
"parameters": {
"resource": "folder",
"name": "={{ $json.slug }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"value": "root",
"mode": "list",
"cachedResultName": "/ (Root folder)",
"cachedResultUrl": "https://drive.google.com/drive"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-640,
80
],
"id": "bf26fc49-f91c-40f1-83d3-d2330f242f56",
"name": "Create folder",
"credentials": {
"googleDriveOAuth2Api": {
"id": "aqCousOTolMFE3cy",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"jsCode": "const title = $json[\"Product Title\"] || \"default\";\nconst slug = title.toLowerCase().replace(/\\s+/g, '-') + '-' + Math.random().toString(36).substring(2, 8);\nreturn { slug };\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-860,
80
],
"id": "4eadd7af-a13d-40a8-b886-71c798acc547",
"name": "Create Slug"
},
{
// ... truncated (copy to see full JSON)How to Import This Workflow
- 1Copy the workflow JSON above using the Copy Workflow JSON button.
- 2Open your n8n instance and go to Workflows.
- 3Click Import from JSON and paste the copied workflow.
Don't have an n8n instance? Start your free trial at n8nautomation.cloud
Related Templates
AI LinkedIn Content Creator with Perplexity Research & Auto-Posting
AI-Powered LinkedIn Content Automation Workflow Overview This workflow automates the entire LinkedIn content lifecycle — from research and ideation to image generation and scheduled posting. It uses Perplexity AI for topic research, an Anthropic Claude model as the content strategist, and OpenAI's image generation model to create branded visuals. The workflow runs on two separate schedules: one for content creation (daily) and one for publishing (twice weekly). It stores all posts in a Google Sheet for review before they go live, giving you full control over what gets published. This is ideal for founders, marketers, and content creators who want to maintain a consistent LinkedIn presence without spending hours writing, designing, and scheduling posts manually. The system learns from past content stored in Google Sheets and uses AI to generate fresh, on-brand posts that resonate with your target audience. Node-by-Node Breakdown Content Creation Pipeline (Runs Daily at 5 AM) Schedule () — No auth. Triggers the content creation workflow daily at 5:00 AM. This is the starting point for generating new post ideas. Get Past Ideas () — OAuth2. Reads all rows from the "LinkedIn Posts" sheet in the Google Sheet "AI Content Database". This provides the AI with context about previously generated posts to avoid repetition. Join Ideas () — No auth. A JavaScript code node that concatenates all past post ideas into a single text string, making it easy for the AI to reference them. LinkedIn Creator Agent () — No auth (uses connected models). This is the core AI agent that generates LinkedIn post content. It uses: - Anthropic Chat Model () — API Key auth. Uses Claude 3.7 Sonnet as the language model for content generation. - Perplexity Research () — API Key auth. A sub-workflow that uses Perplexity AI to research current topics and trends. - Structured Output Parser () — No auth. Ensures the AI output follows a structured JSON format with fields: , , and . Image Style () — OAuth2. Downloads a reference image from Google Drive that serves as the style guide for generating new images. OpenAI Image1 () — Header Auth (HTTP Header Auth). Sends a POST request to OpenAI's image generation API (gpt-image-1 model) with the reference image and a prompt describing the desired image for the LinkedIn post. Convert to File () — No auth. Converts the base64 image data from OpenAI's response into a binary file for saving to Google Drive. Save Image () — OAuth2. Uploads the generated image to a specific folder ("LinkedIn AI Posts") in Google Drive, naming it after the post title. Save Post () — OAuth2. Appends a new row to the "LinkedIn Posts" sheet with the post text, description, image URL, and status set to "review". Publishing Pipeline (Runs Every 3 Days at 2 PM) Schedule 2 () — No auth. Triggers the publishing workflow every 3 days at 2:00 PM. Get Ready Posts () — OAuth2. Filters the Google Sheet for rows where the status column equals "ready", retrieving posts that have been approved for publishing. Pick One () — No auth. Limits the output to a single post (first row) from the filtered results. Download Image () — OAuth2. Downloads the image associated with the selected post from Google Drive using the image URL stored in the sheet. Publish Post () — OAuth2. Publishes the post to LinkedIn with the text content and attached image, set to public visibility. Update Status () — OAuth2. Updates the status of the published post from "ready" to "posted" in the Google Sheet, matching by the "about" column. Setup Instructions Required Accounts & Services Google Account — For Google Sheets and Google Drive access. You'll need to create a Google Cloud Project and enable the Sheets and Drive APIs, then create OAuth2 credentials. Anthropic Account — Sign up at console.anthropic.com to get an API key for Claude 3.7 Sonnet. Perplexity AI Account — Sign up at perplexity.ai and obtain an API key for research capabilities. OpenAI Account — Sign up at platform.openai.com and get an API key for image generation. LinkedIn Account — You'll need a LinkedIn profile or company page to post to. Connect via n8n's LinkedIn OAuth integration. Configuration Steps Create a Google Sheet named "AI Content Database" with a sheet called "LinkedIn Posts" containing columns: , , , . Upload a reference image to Google Drive that represents your brand's visual style. Update the Google Sheet ID and folder IDs in the nodes to match your own. Configure all credential connections in n8n for each service. Adjust the cron schedules to match your desired posting frequency. Customize the AI system prompt in the LinkedIn Creator Agent to match your brand voice. Use Cases & Variations Primary Use Cases Personal Brand Building: Automate daily LinkedIn content for thought leaders and consultants. Agency Content Management: Manage multiple client content calendars from a single workflow. Content Repurposing: Adapt the workflow to generate content for Twitter, Instagram, or newsletters. Possible Variations Platform Swap: Replace the LinkedIn node with Twitter, Facebook, or Slack nodes. Research Source: Swap Perplexity for a Google Search API or RSS feed reader. Image Model: Use DALL-E 3 or Stable Diffusion instead of gpt-image-1. Review Workflow: Add a Slack notification node to alert you when posts are ready for review. Multi-Platform Publishing: Duplicate the publishing pipeline for different social networks. Content Calendar: Add a calendar node to schedule posts for specific dates and times.
Auto-Generate Social Posts from YouTube via Dumpling AI
🧠 Automate Social Media Content Creation from YouTube Videos This powerful workflow automatically generates platform-specific social media posts (Instagram, Facebook, LinkedIn) from YouTube videos. It takes a topic from a Google Sheet, searches for relevant YouTube videos using Dumpling AI, selects the best match with GPT-4o, fetches the transcript, and creates tailored posts with matching AI-generated images — all saved back to your Google Sheet. Perfect for content creators, social media managers, and marketers who want to repurpose YouTube content efficiently. The workflow runs on a schedule, processes one topic at a time, and marks topics as completed to avoid duplication. It combines the power of Dumpling AI for YouTube search and image generation, OpenAI's GPT-4o for intelligent content selection and copywriting, and Google Sheets for data management. 📋 Node-by-Node Breakdown Trigger Search Schedule (Schedule Trigger) — No auth required. Runs the workflow on a configurable interval (default: every hour). You can adjust the schedule in the node settings. Get Unsearched Topic from Google Sheet (Google Sheets) — OAuth2 (Google Sheets). Reads the first unsearched topic from the "YouTube Topics" sheet. Uses a filter to find rows where "Searched?" column is empty, and returns only the first match. Search YouTube via Dumpling AI (HTTP Request) — Header Auth (Dumpling AI API key). Sends a POST request to Dumpling AI's YouTube search endpoint with the topic as query. Returns video results matching the search term. Filter + Sort YouTube Videos (Code) — No auth. Custom JavaScript that extracts video data from the API response, filters for video type, sorts by published date (newest first), and returns the 3 most recent videos. Prepare Video List for AI (Aggregate) — No auth. Combines all video items into a single array for processing by the AI node. Select Best Video with GPT-4o (OpenAI) — API Key auth (OpenAI). Uses GPT-4o to analyze the search results and select the most relevant video based on the original topic and current date. Returns the best match in structured JSON format. Get Transcript (Dumpling AI) (HTTP Request) — Header Auth (Dumpling AI API key). Fetches the YouTube transcript for the selected video using Dumpling AI's transcript endpoint. Generate Posts with GPT-4o (OpenAI) — API Key auth (OpenAI). Takes the transcript and generates three platform-specific posts (Instagram, Facebook, LinkedIn) with matching image prompts. Each post is tailored to the platform's style and audience. Generate Instagram Image (Dumpling AI) (HTTP Request) — Header Auth (Dumpling AI API key). Creates an AI-generated image for the Instagram post using FLUX.1-pro model. Generate Facebook Image (Dumpling AI) (HTTP Request) — Header Auth (Dumpling AI API key). Creates an AI-generated image for the Facebook post. Generate LinkedIn Image (Dumpling AI) (HTTP Request) — Header Auth (Dumpling AI API key). Creates an AI-generated image for the LinkedIn post. Format Instagram Post (Set) — No auth. Structures the Instagram post data with platform name, content text, and image URL. Format Facebook Post (Set) — No auth. Structures the Facebook post data similarly. Format LinkedIn Post (Set) — No auth. Structures the LinkedIn post data similarly. Save Instagram Post to Sheet (Google Sheets) — OAuth2 (Google Sheets). Appends the formatted Instagram post to the "Social Media Post" sheet. Save Facebook Post to Sheet (Google Sheets) — OAuth2 (Google Sheets). Appends the formatted Facebook post to the same sheet. Save LinkedIn Post to Sheet (Google Sheets) — OAuth2 (Google Sheets). Appends the formatted LinkedIn post to the same sheet. Merge Post Results (Merge) — No auth. Combines the three post results into a single output for the final update step. Update Topic Status in Sheet (Google Sheets) — OAuth2 (Google Sheets). Marks the original topic as "Searched?" = "Yes" in the YouTube Topics sheet to prevent reprocessing. 🔧 Setup Instructions Required Accounts & Credentials: Google Account — For Google Sheets access. Create OAuth2 credentials in n8n for Google Sheets. Dumpling AI Account — Sign up at app.dumplingai.com and get your API key. Add as Header Auth credential in n8n. OpenAI Account — Get your API key from platform.openai.com. Add as API Key credential in n8n. Required Google Sheets: YouTube Topics sheet with columns: , Social Media Post sheet with columns: , , 💡 Use Cases & Variations Primary Use Cases: Content repurposing for social media managers Automated content calendar creation YouTube-to-social-media content pipeline Brand consistency across platforms Adaptation Ideas: Add more platforms (Twitter/X, TikTok, Pinterest) Schedule posts directly to social media using n8n integrations Add human review step before posting Use different AI models for image generation Add email newsletter content generation Include video thumbnail generation Add analytics tracking for post performance
Contact Form to Slack & Email Notification Workflow
This workflow automates the process of capturing contact form submissions from your website and immediately notifying your team via Slack while also sending a confirmation email to the submitter. It's designed to help businesses respond faster to leads and inquiries without manual intervention. Workflow Steps Form Submission on Website (No auth) — This node creates a simple web form that collects Name, Email, and Phone from visitors. The form is embedded on your website using the provided webhook URL. No authentication is required as it's a public-facing form. Slack (OAuth2) — Sends a formatted message to your designated Slack channel (e.g., #leads) containing the submitted details. Requires a Slack app with bot token and appropriate channel permissions. Send Email - Gmail (OAuth2) — Sends a thank-you email to the submitter using Gmail API. Requires OAuth2 credentials for a Google account. Send Email - Outlook (OAuth2) — Sends the same thank-you email via Microsoft Outlook API. Requires OAuth2 credentials for a Microsoft account. Setup Instructions Slack: Create a Slack app with chat:write scope, install it to your workspace, and add the bot to your target channel. Gmail: Enable Gmail API in Google Cloud Console, create OAuth2 credentials, and authorize the workflow. Outlook: Register an app in Azure AD, grant Mail.Send permission, and configure OAuth2 credentials. Form: Copy the webhook URL from the Form Submission node and embed it as the form action in your HTML form. Use Cases & Variations Lead capture: Replace Slack with CRM nodes (HubSpot, Salesforce) to create contacts automatically. Multi-channel notifications: Add SMS via Twilio or push notifications via Telegram. Conditional routing: Use IF nodes to route different form responses to different Slack channels or email templates. Data enrichment: Add HTTP Request nodes to enrich lead data (e.g., company info from email domain).