Code workflows
37 results — all source-linked n8n references
Create daily vaping news avatar videos with Perplexity, Browserless, HeyGen, Telegram and Google Drive
Quick Overview This workflow runs daily at 9 AM, uses Perplexity to compile vaping industry news, optionally captures article screenshots via Browserless, and generates a HeyGen avatar video from a template. It then polls for completion, sends a Telegram notification, and archives the final video to Google Drive. How it works Runs daily at 9 AM and sets the output mode (portrait/landscape) and background type (screenshot or inline_title). If set to inline_title, it asks Perplexity for 4 ready-to-use stories (title, script, subtitle) and maps them into HeyGen template variables. If set to screenshot, it asks Perplexity for up to 10 stories, validates article accessibility with Browserless scraping until it collects 4 reachable URLs, and prepares the final story list. For the screenshot path, it screenshots each article with Browserless, uploads each image to HeyGen, and combines each story with its uploaded image URL. It sends the assembled template variables to HeyGen to generate a template-based video (in test mode) with the configured dimensions. It waits briefly, polls HeyGen until the video status is completed, and formats the final video metadata. It posts an optional Telegram
Clone brand voices and generate voiceovers with Smallest AI and Google Drive
Quick Overview This workflow receives a webhook request with an audio sample URL, voice name, and script, clones a voice and generates a matching voiceover using Smallest AI, uploads the MP3 to Google Drive, logs the voice ID in Google Sheets, and returns a public link in the webhook response. How it works Receives a POST webhook request containing an audio_url, voice_name, and script text. Downloads the provided voice sample file from the audio_url. Sends the sample to Smallest AI Voice Cloning to create a new voice profile and extracts the returned voiceId. Truncates the script text to a safe length and synthesizes speech with Smallest AI using the cloned voice ID. Uploads the generated MP3 voiceover to Google Drive and updates its sharing settings to be publicly readable. Appends the cloned voice ID and voice name to a Google Sheets “voice library” spreadsheet and returns a JSON response with the voice ID, Drive link, and timestamp. Setup Create a Smallest AI API key, store it securely in n8n, and replace the hardcoded Authorization: Bearer ... header used for voice cloning. Add a Smallest AI credential in n8n for the speech synthesis step and ensure it has access to the same Sm
Translate audio transcripts with Gladia, Google Drive, and Google Sheets
Quick overview This workflow collects a public media URL and target language via an n8n form, sends the audio/video to Gladia for transcription and translation, then saves a Markdown transcript file to Google Drive and logs the outcome (success or failure) to Google Sheets. How it works Receives a form submission containing a publicly reachable audio/video URL and a target language code. Starts a Gladia pre-recorded job with transcription enabled and translation configured for the requested target language. Waits and repeatedly polls Gladia’s result URL until the job finishes, errors, or reaches the maximum number of attempts. When Gladia reports the job as done, builds a Markdown file containing the original transcript, the translated transcript, and language metadata. Uploads the Markdown file to Google Drive. Appends a “Translated” row to Google Sheets with the media URL, detected language, target language, and a Drive link, or logs a “Failed” row with error details if any step fails. Setup Add a Gladia API key using an HTTP Header Auth credential (header name x-gladia-key) and select it for both Gladia HTTP Request steps. Connect Google Drive OAuth credentials and choose the de
Transcribe speaker-labeled recordings with Gladia, Google Drive, and Slack
Quick overview This workflow collects a public media URL via an n8n form, sends it to Gladia for diarized transcription, formats the result as a speaker-labeled Markdown note, saves it to Google Drive, and posts the Drive link (or any failure reason) to a Slack channel. How it works Receives a form submission containing a public audio/video URL and an optional hint for the number of speakers. Starts an asynchronous Gladia pre-recorded transcription job with speaker diarization enabled. Waits and repeatedly polls Gladia for the job status until it is done, errors, or reaches the configured maximum number of attempts. When complete, converts Gladia’s diarized utterances into a readable Markdown transcript grouped by speaker and timestamped. Uploads the transcript file to Google Drive and posts a Slack message with the share link. If the Gladia requests fail or the job times out/errors, posts a Slack message describing the failure. Setup Create an HTTP Header Auth credential for Gladia (header x-gladia-key) and select it on both Gladia HTTP Request steps. Connect a Google Drive OAuth2 account and choose the target Drive/folder where transcripts are uploaded. Connect a Slack account an
Rotate YouTube channel banners on a schedule with Google Sheets and Drive
Quick Overview This workflow runs daily at 8am to rotate a YouTube channel banner based on a schedule stored in Google Sheets, downloading the banner image from Google Drive, applying it via the YouTube API, and updating the sheet to mark the banner as applied. How it works Runs every day at 8am on a schedule trigger. Reads the banner rotation plan from Google Sheets, including swap date, Google Drive file ID, label, and status. Filters the sheet rows to keep banners due today or overdue that are not yet marked as Applied, and sorts them oldest-first. Downloads the selected banner image from Google Drive and uploads it as a YouTube channel banner. Fetches the current YouTube channel branding settings and updates the channel to activate the new banner while preserving existing branding fields. Updates the matching Google Sheets row to set Status to Applied and outputs a log record with the swap timestamp, channel ID, and banner details. Setup Add Google OAuth credentials for YouTube Data API and connect them to the YouTube nodes. Add Google Sheets and Google Drive credentials and connect them to the respective nodes. Set your YouTube channel ID in the banner configuration step. Upda
Create daily webpage PDF reports with PDFBolt, Slack and Google Drive
Quick overview This workflow creates a daily PDF report from a webpage URL with PDFBolt, posts it to Slack, and archives the same PDF in Google Drive. How it works Runs every day at 08:00 on a scheduled trigger. Sets the report date, webpage URL, report title, Slack message, and a dated PDF filename. Converts the configured webpage URL into an A4 PDF with PDFBolt, using Network Idle so charts, images, and async content can finish loading. Uploads the generated PDF to Slack with a title, filename, and initial comment. Uploads the same PDF file to a selected Google Drive folder for storage. Setup Add your PDFBolt API key from https://app.pdfbolt.com/api-keys in n8n. Add a Slack OAuth2 connection and replace the Slack channel ID with your target channel. Add a Google Drive OAuth2 connection and choose the destination Drive and folder for archived reports. Update the report URL and report name values in the report settings code so they match the page you want to capture. Requirements PDFBolt account and API key Slack account connected in n8n Google Drive account connected in n8n Customization Change the report URL, report name, and PDF filename Choose a different Slack channel Choose a
Generate SRT and VTT subtitles from media URLs with Gladia and Google Drive
Quick Overview This workflow collects a public media URL via an n8n form, sends it to Gladia to generate SRT and VTT subtitles, uploads the subtitle files to Google Drive, and returns Drive download links back in the form completion page. How it works Receives a media URL (and optional title) from an n8n Form Trigger. Submits the media URL to the Gladia pre-recorded transcription API with subtitles enabled for SRT and VTT output. Waits and repeatedly polls Gladia for the job result until the status is done, or stops and fails if Gladia returns an error or the max-attempt limit is reached. Extracts the SRT and VTT subtitle tracks from Gladia’s response, builds each one into a file, and stops with an error message if no subtitle tracks are returned. Uploads the generated subtitle files to a specified Google Drive folder. Displays a completion message in the form response containing the Google Drive links for the SRT and VTT files. Setup Create an HTTP Header Auth credential for Gladia (header name x-gladia-key) and select it for the Gladia API request steps. Connect a Google Drive OAuth2 credential and set the destination folder ID used for uploading subtitle files. Update the pollin
Build a sound effect library with Google Sheets, ElevenLabs, Google Drive and Slack
Quick overview This workflow runs manually or every 15 minutes to read queued sound-effect prompts from Google Sheets, generate MP3s via the ElevenLabs sound-generation API, upload them to Google Drive, update each row with status and a file link, and post a run recap to Slack. How it works Runs manually or on a 15-minute schedule. Reads all rows from a Google Sheets tab and selects a capped batch where Status is blank or Queued and Description is present, clamping DurationSeconds and PromptInfluence to valid ranges. Sends each selected Description to the ElevenLabs sound-generation API to generate an MP3 file. Uploads the returned MP3 to a specified Google Drive folder using a deterministic filename based on the sheet row. Updates the matching Google Sheets row to Done with the Google Drive link and timestamp, or to Failed with error notes and timestamp if generation or upload fails. Counts how many rows succeeded or failed in the run and posts a one-line recap message to a selected Slack channel. Setup Add an ElevenLabs HTTP Header Auth credential (xi-api-key) and select it in the ElevenLabs request step. Connect Google Sheets OAuth2 credentials and set the spreadsheet and sheet
Transcribe Google Drive audio to markdown with Gladia and Google Sheets
Quick overview This workflow watches a Google Drive folder for new audio files, sends them to Gladia for asynchronous transcription, saves the resulting Markdown transcript back to Google Drive, and appends a success or failure record (with a link and details) to a Google Sheets log. How it works Triggers every minute when a new file is created in a specific Google Drive folder. Downloads the new file from Google Drive and uploads the binary audio to Gladia. Starts a Gladia pre-recorded transcription job and waits a configurable interval before checking status. Polls Gladia for the job result until the status is "done", an error is returned, or the maximum attempt limit is reached. When completed, formats the transcript into a Markdown file (including metadata and speaker utterances when available) and uploads it to a target Google Drive folder. Appends a row to Google Sheets with the timestamp, source file name, duration, status, transcript link, and a short preview, or logs a failure row with the error or timeout reason. Setup Add Google Drive OAuth2 credentials and set the source folder ID to watch and the destination folder ID where transcripts are saved. Create a Gladia HTTP H
Generate sound effect variation packs with ElevenLabs and Google Drive
Quick overview This workflow collects a single sound-effect brief via an n8n form, generates multiple variation takes with the ElevenLabs sound-generation API, and uploads each MP3 into a timestamped Google Drive folder, then returns a results page with links and per-take status. How it works Receives a sound-effect brief (plus optional take count, duration, and prompt influence) from an n8n form submission. Validates and clamps the inputs, plans the requested number of takes with slightly varied prompt influence values, and generates a timestamped subfolder name. Creates a new subfolder in Google Drive under the configured parent output folder for this run. Builds one ElevenLabs sound-generation API request per take and calls ElevenLabs to generate an MP3 for each variation. Uploads each generated MP3 to the run’s Google Drive subfolder and records whether each take succeeded or failed. Displays an HTML completion page that links to the Google Drive folder and lists each take with a file link or error message. Setup Create an ElevenLabs HTTP Header Auth credential that sends your API key as the xi-api-key header and select it in the ElevenLabs request step. Add a Google Drive OAut
Rename Japan e-bookkeeping receipts and invoices with Gemini and Google Drive
Quick overview Helps Japanese businesses digitizing paper invoices and receipts under Japan's Electronic Bookkeeping Act. Files in a Google Drive INPUT folder are read with Google Gemini OCR, then copied to OUTPUT with a compliant searchable filename (date_partner_amount_type) or to SKIP for human review. Originals are never modified. How it works Runs manually to start processing. Lists up to the configured maximum number of files in a Google Drive INPUT folder and iterates through them one at a time. Downloads each file from Google Drive, detects its MIME type, base64-encodes the content, and prepares a Gemini request payload. Sends supported images and PDFs to the Google Gemini generateContent API to extract document count, transaction date, partner, amount, and document type as JSON. Builds a compliant filename in the format YYYYMMDD_partner_amount_type.ext when the response indicates a single valid document with required fields. Copies the original file to a Google Drive OUTPUT folder using the new filename, or copies it to a SKIP folder unchanged when the file type is unsupported or the extraction is ambiguous (non-document/multiple documents/missing fields). Setup Create thr
File Google Drive inbox documents into dated folders with a Google Sheets audit log
Quick overview This workflow monitors a Google Drive inbox folder for new files, classifies them by filename regex rules, files them into a Year/Month/Type folder structure in Google Drive, and logs each success or failure to a Google Sheets audit log. How it works Triggers every minute when a new file is created in a selected Google Drive folder. Evaluates the filename against configurable regular-expression rules to assign a document type, derive the year/month from the file’s created time, and build a destination path. Uses the planned destination root to find or create the required year folder, then the month folder, then the type folder in Google Drive. Moves the file into the final type folder. Appends a “Filed” audit row to Google Sheets with timestamp, original filename, matched rule, destination path, and file ID. If any step errors, appends a “Failed” audit row to Google Sheets with error details so the run continues. Setup Add Google Drive OAuth2 credentials, select the inbox folder to watch, and ensure the archive root is a different Google Drive folder to avoid reprocessing filed files. In the rules script, paste your archive root folder ID and adjust the filename rege
Create studio-quality car listing photos using Google Drive and Gemini 2.5
Quick overview This workflow manually processes car photos from Google Drive, sends each image plus a studio backdrop and logo to the Google Gemini Image API for background replacement and license-plate branding, and uploads the generated studio-style images back to an output Google Drive folder. How it works Runs when you manually execute the workflow. Lists all image files in a specified Google Drive input folder and processes them one at a time. Downloads the current car photo and also lists and downloads the studio asset images (virtual backdrop and logo) from a separate Google Drive folder. Builds a multimodal request that instructs Google Gemini to classify the shot (exterior vs interior/engine), replace the background accordingly, and swap any visible license plate with the provided logo. Sends the request to the Google Gemini image generation endpoint and receives a generated image in the response. Extracts the generated image, names it using the original filename with a “_studio.jpg” suffix, and uploads it to a specified Google Drive output folder. Setup Add Google Drive OAuth2 credentials and set the input, studio assets, and output folder IDs in the Google Drive nodes’ q
Generate SRT subtitles for Google Drive audio with Smallest.ai
Quick Overview This workflow watches a Google Drive folder for new audio files, transcribes them with Smallest.ai, converts the transcription into an SRT subtitle file, and uploads the .srt back to the same Google Drive folder. How it works Triggers every minute when a new file is created in a specified Google Drive folder. Checks the file extension to confirm it is a supported audio format (mp3, wav, aac, ogg, flac, m4a, wma). Downloads the audio file from Google Drive. Sends the audio to Smallest.ai for speech-to-text transcription. Formats the transcription into timestamped SRT cues (using returned segments when available, otherwise estimating timings). Uploads the generated .srt subtitle file back to the watched Google Drive folder. Setup Add a Google Drive OAuth credential and select the folder to watch/upload to in both the trigger and upload steps. Add your Smallest.ai credentials in the transcription step. Ensure the monitored folder receives audio files with supported extensions, or update the extension-matching pattern to fit your media types.
Audit Google Drive backup freshness with Google Sheets and Slack
Quick overview This workflow runs nightly to audit a Google Drive backup folder against an SLA table in Google Sheets, logging a per-source scorecard and sending a Slack alert only when backups are missing, stale, or unexpectedly small. How it works Runs on a nightly schedule. Reads an SLA table from Google Sheets that defines expected backup sources, filename patterns, cadence, and freshness/size thresholds. Searches a specified Google Drive folder and retrieves metadata for all non-trashed files. Compares each SLA row to matching Drive files to classify the newest backup as OK, MISSING, STALE, or SHRUNK and builds an alert summary for any failures. Appends one scorecard row per source to a Google Sheets audit tab with the run time, verdict, newest file details, and size comparisons. Posts a single Slack message listing all failing sources when at least one source is not OK. Setup Add Google Sheets OAuth2 credentials, select the spreadsheet and the SLA and scorecard sheet tabs in the Google Sheets nodes. Add Google Drive OAuth2 credentials and replace the placeholder folder ID in the Drive search query to point at your backup folder. Add Slack credentials and choose the channel to
Reconcile daily Google Drive CSV exports into a master file and send a Slack recap
Quick overview This workflow runs daily to reconcile multiple CSV exports from a Google Drive folder into a deduplicated master CSV, quarantine invalid or duplicate rows into a reject CSV, and post a run summary to a Slack channel. How it works Runs every day at 06:00 (cron) on a schedule. Searches a Google Drive folder for CSV files whose names do not include the "reconciled-" prefix, then downloads each file. Parses each downloaded CSV into rows and records any files that cannot be parsed. Validates each row for required columns and basic data types, deduplicates by order_id (keeping the first), and routes invalid, duplicate, or unreadable inputs into a reject dataset with reasons. Builds and uploads a dated master CSV (reconciled-master-YYYY-MM-DD.csv) back to Google Drive when there are valid rows. Builds and uploads a dated reject CSV (reconciled-rejects-YYYY-MM-DD.csv) back to Google Drive when any rows are quarantined. Posts a recap message to Slack with counts for files read, rows processed, merged rows, quarantined rows, duplicates dropped, and unreadable files. Setup Add Google Drive OAuth2 credentials and select the input folder to search in the Google Drive search step.
Create restorable n8n Docker backups in Google Drive via SSH
Quick overview This workflow backs up n8n workflows and encrypted credentials from a self-hosted Docker instance via SSH, stores the exports as JSON files in structured Google Drive folders, and provides a Basic Auth–protected form to restore uploaded backups back into an n8n Docker container. How it works Runs on a cron schedule to start a backup and set the target n8n Docker container name and timestamp. Creates a timestamped backup folder in Google Drive with subfolders for workflows and credentials. Connects over SSH and runs the n8n CLI inside the Docker container to export all workflows and all credentials as JSON. Uploads a full workflows-all.json export and also uploads each workflow as its own JSON file into the Google Drive workflows folder. Uploads a full credentials-all.json export and also uploads each credential as its own JSON file into the Google Drive credentials folder. Builds a combined workflows-credentials.json package from both exports and uploads it to the root of the Google Drive backup folder. Accepts one or more uploaded .json files through a Basic Auth–protected n8n form, detects whether they contain workflows or credentials, then copies a generated impor
Generate & Upload Images with Image-to-Image GPT, Google Sheets & Drive
🖼️ Image-to-Image AI Generator from Google Sheets with Google Drive Upload ✅ Use Case Automatically generate AI images from prompts listed in a Google Sheet, upload the images to Google Drive, and log the result back into the sheet. Uses the image-to-image-gpt API for fast, customizable generation. 💡 Problem It Solves Manual image generation workflows are inefficient and error-prone. Creative and content teams often have to: Manually paste prompts into image generation tools Save images locally Upload to Google Drive Paste the link back into tracking spreadsheets This automation removes all that friction—turning one spreadsheet into a complete image creation pipeline. 🌟 Benefits 🔁 Fully automated image generation 📤 Direct uploads to Google Drive 🧾 Image links and timestamps logged in Google Sheets ⚠️ Built-in error logging for API failures 🧩 Modular and easily extensible 📊 Keeps a historical log of successes and errors 🧩 Workflow Overview | Node | Description | |------|-------------| | 1. Manual Trigger | Starts the workflow when executed manually | | 2. Google Sheets2 | Reads all rows from the input Google Sheet | | 3. Loop Over Items | Processes one row (prompt) at a tim
Create Google Drive Folders by Path
This workflow creates nested Google Drive folders from a path string (like Projects/Clients/Reports). It automatically handles the necessary folder lookups and creation steps required by Google Drive, then outputs the final folder's ID for immediate use. How it works This workflow streamlines the creation of nested folders in Google Drive: Input: Provide a root_folder_id and a path (e.g., Projects/Clients/Reports) as input. Path Parsing: The workflow splits the path into individual folder names (based on the / separator) Iterative Check & Create: Loops through each part of your path: Searches within the current parent folder (starting with the root_folder_id) for a subfolder matching the name. If found: Retrieves the existing folder's ID to use as the parent for the next iteration. If not found: Creates a new folder with that name inside the current parent folder and uses the new folder's ID as the parent for the next iteration. Output: Returns the Google Drive Folder ID of the very last folder in the specified path (e.g., the ID for Reports in the example above). This ID can then be directly used in subsequent n8n nodes to upload files, create documents, or perform other actions w
Deploy Workflows from Google Drive to n8n Instance
Automatically deploy n8n workflows by simply dropping JSON files into a Google Drive folder—this template watches for new exports, cleans and imports them into your n8n instance, applies a tag, and then archives the processed files. Who is this template for? This workflow template is designed for n8n power users, and automation specialists who need a simple, reliable way to bulk‑deploy or version‑control n8n workflows via Google Drive. It’s perfect if you: Manage multiple n8n instances (staging, production, etc.) Want an easy “drop‑in” approach to publish new or updated workflows Prefer storing/exporting JSON in Drive rather than editing in the UI Use case Manually importing .json exports into n8n is slow and error‑prone. With this template you can: Keep your workflows in a shared Drive folder (version control friendly) Automatically sanitize each file so only supported settings go through Tag deployed workflows consistently for easy filtering Move processed files to a “Deployed” folder for clear change tracking How it works Watch “ToDeploy” folder in Google Drive for new .json files Download & parse each file into a JSON object Clean payload: strip out everything except the allowe
Google Drive Duplicate File Manager
Google Drive Duplicate File Manager 🧹📁 Purpose: Automate the process of finding and managing duplicate files in your Google Drive. Who's it for? Individuals and teams aiming to streamline their Google Drive. Anyone tired of manual duplicate file cleanup. What it Solves: Saves storage space 💾. Reduces file confusion 😕➡️🙂. Automates tedious cleanup tasks 🤖. How it works: Trigger: Monitors a Google Drive folder for new files. Configuration: Sets rules for keeping and handling duplicates. Find Duplicates: Identifies duplicate files based on their content (MD5Checksum). Action: Either moves duplicates to trash or renames them. Setup Guide: Google Drive Trigger ⏰: Set up the trigger to watch a specific folder or your entire drive (use caution with the root folder! ⚠️). Configure the polling interval (default: every 15 minutes). Config Node ⚙️: keep: Choose whether to keep the "first" or "last" uploaded file (default: "last"). action: Select "trash" to delete duplicates or "flag" to rename them with "DUPLICATE-" (default: "flag"). owner & folder: Taken from the trigger. Only change if needed. Key Considerations: Google Drive API limits:** Be mindful of API usage. Folder Scope:* The
Automatically Create Cinematic Quote Videos with AI and Upload to YouTube
⚠️ Important Disclaimer: This template is only compatible with a self-hosted n8n instance using a community node. Who is this for? This workflow is ideal for digital content creators, marketers, social media managers, and automation enthusiasts who want to produce fully automated vertical video content featuring inspirational or motivational quotes. Specifically tailored for Thai language, it effectively demonstrates integration of AI-generated imagery, video, ambient sound, and visually appealing quote overlays. What problem is this workflow solving? Manually creating high-quality, vertically formatted quote videos is often repetitive, time-consuming, and involves multiple tedious steps like selecting suitable visuals, editing audio tracks, and correctly overlaying text. Additionally, manual uploading to platforms like YouTube and maintaining accurate content records are prone to errors and inefficiencies. What this workflow does: Fetches a quote, author, and scenic background description from a Google Sheet. Automatically generates a vertical background image using the Flux AI (txt2img) API. Transforms the AI-generated image into a subtly animated cinematic vertical video using t
Automatically Create and Upload YouTube Videos with Quotes in Thai Using FFmpeg
Who is this for? This workflow is perfect for digital content creators, marketers, and social media managers who regularly create engaging short-form videos featuring inspirational or motivational quotes. While the workflow is universally applicable, it specifically highlights Thai as an example to demonstrate effective language and font integration. What problem is this workflow solving? Creating consistent and engaging multilingual video content manually, including attractive fonts and proper video formatting, is time-consuming and repetitive. Additionally, managing files, background music, and updating statuses manually can be tedious and prone to errors. What this workflow does Automatically fetches background video and music files stored on Google Drive. Randomly selects a quote (demonstrated with Thai language) and author information from Google Sheets. Dynamically combines the selected quote and author text using appealing fonts, such as the Thai font "Kanit," directly onto the video using FFmpeg on your n8n local environment. Creates visually engaging videos with a 9:16 aspect ratio, optimized for YouTube Shorts and other vertical video platforms. Automatically uploads the
Automated Image Optimizer: convert JPG/PNG to WebP with APYHub and Google Drive
This workflow automates the process of converting images from JPG/PNG format to WEBP using the APYHub API. It retrieves image URLs from a Google Sheet, converts the images, and uploads the converted files to Google Drive. This workflow is a powerful tool for automating image conversion tasks, saving time and ensuring that images are efficiently converted and stored in the desired format. Using WebP images on a website provides several SEO benefits: Faster Loading Speed – WebP files are smaller than JPG and PNG, reducing page load times and improving user experience. Better Core Web Vitals – Google prioritizes websites with good performance metrics like LCP (Largest Contentful Paint). Improved Mobile Performance – Smaller images consume less bandwidth, enhancing mobile usability. Higher Search Rankings – Faster sites tend to rank better on Google due to improved user experience. Reduced Server Load – Lighter images lower hosting and CDN costs while improving site efficiency. Below is a breakdown of the workflow: 1. How It Works The workflow is designed to convert images from JPG/PNG to WEBP format and manage the converted files. Here's how it works: Manual Trigger: The workflow star