Download recently liked songs automatically with Spotify
Purpose
This workflow enables you to listen to your recent favorites in very hight quality offline without sacrificing all of your storage.
How it works
This workflow automatically creates a playlist in Spotify named "Downloads" which periodically gets updated so it always contains only a defined amount of the latest liked songs.
This enables only the Downloads playlist to set for automatic downloading and thus free up space on the device.
Setup
- The workflow is ready to go. Just select your Spotify credentials and activate the workflow.
- In Spotify just enable automatic downloads on the automatically created Downloads folder after the first workflow run.
Current limitations
This setup currently supports a maximum of 50 songs in the Downloads Playlist. This is due to the paylod limits defined by Spotify encountered in the Get liked songs node. Implementing batching would solve the issue.
n8n Spotify Recently Liked Songs Downloader
This n8n workflow automates the process of fetching recently liked songs from Spotify, filtering them, and preparing the data for further processing or storage. It's designed to run on a schedule, ensuring you always have an up-to-date list of your favorite tracks.
What it does
This workflow performs the following steps:
- Triggers on a Schedule: The workflow is set to run periodically (e.g., daily, hourly) to check for new liked songs.
- Fetches Recently Liked Songs from Spotify: It connects to your Spotify account and retrieves a list of tracks that you have recently liked.
- Filters out Podcasts: It checks each retrieved item to determine if it's a podcast. If an item is identified as a podcast, it is filtered out.
- Processes Tracks (if not a podcast): For items that are actual music tracks, it extracts relevant information.
- Aggregates Track Data: It combines the processed track data into a single structure.
- Splits Out Individual Tracks: The aggregated data is then split into individual items, making each track independently available for subsequent nodes.
- Filters for Specific Track Type: It applies another filter, likely to ensure only actual "track" type items proceed, further refining the data.
- Edits Fields for Output: It transforms and renames fields to create a clean and consistent output for each track, including details like track name, artist, album, and Spotify URL.
Prerequisites/Requirements
- n8n Instance: A running n8n instance (self-hosted or cloud).
- Spotify Account: A Spotify account with liked songs.
- Spotify API Credentials: You will need to set up Spotify API credentials within n8n. This typically involves creating a Spotify Developer application to obtain a Client ID and Client Secret.
Setup/Usage
- Import the Workflow:
- Download the provided JSON file.
- In your n8n instance, click on "Workflows" in the left sidebar.
- Click "New" and then "Import from JSON".
- Paste the JSON content or upload the file.
- Configure Spotify Credentials:
- Locate the "Spotify" node in the workflow.
- Click on the "Credential" field and select "Create New Credential".
- Choose "OAuth2 API" for Spotify.
- Follow the instructions to set up your Spotify OAuth2 credentials (Client ID, Client Secret, and Redirect URL).
- Activate the Workflow:
- Once the credentials are set up, activate the workflow by toggling the "Active" switch in the top right corner of the workflow editor.
- Adjust Schedule (Optional):
- By default, the "Schedule Trigger" node might be configured for a specific interval. You can adjust this to your preferred frequency (e.g., every hour, once a day) by editing the "Schedule Trigger" node settings.
After activation, the workflow will automatically run according to its schedule, fetching and processing your recently liked Spotify songs. You can then extend this workflow to save the output to a database, a spreadsheet, send notifications, or integrate with other services.
Related Templates
Monitor & auto-heal AWS EC2 instances with multi-channel alerts
This n8n workflow automates the monitoring, health assessment, and self-healing of AWS EC2 instances in production environments. It runs periodic checks, identifies unhealthy instances based on status and metrics, restarts them automatically, and notifies teams via multi-channel alerts while logging data for auditing and reporting. Key Features Triggers health checks every 5 minutes to proactively monitor EC2 fleet status. Fetches and loops through all production EC2 instances for individualized analysis. Evaluates instance health using AWS metrics and custom thresholds to detect issues like high CPU or stopped states. Performs automatic restarts on unhealthy instances to minimize downtime. Sends instant WhatsApp notifications for urgent alerts, detailed email reports for team review, and logs metrics to Google Sheets for long-term tracking. Includes sticky notes for quick reference on configuration, self-healing logic, and alert setup. Workflow Process The Schedule Trigger node runs the workflow every 5 minutes, ensuring frequent health monitoring without overwhelming AWS APIs. The Get EC2 Instances node fetches all production-tagged EC2 instances from AWS, filtering by environment (e.g., tag: Environment=Production). The Loop Over Instances node iterates through each fetched instance individually, allowing parallel processing for scalability. The Check Instance Status node retrieves detailed health metrics for the current instance via AWS API (e.g., status checks, CPU utilization, and state). The Health Status Check node evaluates the instance's status against predefined thresholds (e.g., failed system checks or high load); if healthy, it skips to logging. The Analyze Health Data node assesses metrics in depth to determine action (e.g., restart if CPU > 90% for 5+ minutes) and prepares alert payloads. The Restart Instance node automatically initiates a reboot on unhealthy instances using AWS EC2 API, with optional dry-run mode for testing. The WhatsApp Notification node (part of Multi-Channel Alerts) sends instant alerts via Twilio WhatsApp API, including instance ID, issue summary, and restart status. The Email Report node generates and sends a detailed HTML report to the team via SMTP, summarizing checked instances, actions taken, and metrics trends. The Google Sheets Logging node appends health data, timestamps, and outcomes to a specified spreadsheet for historical analysis and dashboards. The Sticky Notes nodes provide inline documentation: one for AWS credential setup, one explaining self-healing thresholds, and one for alert channel configurations. Setup Instructions Import the workflow into n8n and activate the Schedule Trigger with a 5-minute cron expression (e.g., /5 *). Configure AWS credentials in the Get EC2 Instances, Check Instance Status, and Restart Instance nodes using IAM roles with EC2 read/restart permissions. Set up Twilio credentials in the WhatsApp Notification node, including your Twilio SID, auth token, and WhatsApp-enabled phone numbers for sender/receiver. Add SMTP credentials (e.g., Gmail or AWS SES) in the Email Report node, and update sender/receiver email addresses in the node parameters. Link Google Sheets in the Google Sheets Logging node by providing the spreadsheet ID, sheet name, and OAuth credentials for write access. Customize health thresholds in Health Status Check and Analyze Health Data (e.g., via expressions for CPU/memory limits). Test the workflow by manually executing it on a small set of instances and verifying alerts/logging before enabling production scheduling. Review sticky notes within n8n for quick tips, and monitor executions in the dashboard to fine-tune intervals or error handling. Prerequisites AWS account with EC2 access and IAM user/role for DescribeInstances, DescribeInstanceStatus, and RebootInstances actions. Twilio account with WhatsApp sandbox or approved number for notifications. SMTP email service (e.g., Gmail, Outlook) with app-specific passwords enabled. Google Workspace or personal Google account for Sheets integration. n8n instance with AWS, Twilio, SMTP, and Google Sheets nodes installed (cloud or self-hosted). Production EC2 instances tagged consistently (e.g., Environment=Production) for filtering. Modification Options Adjust the Schedule Trigger interval to hourly for less frequent checks or integrate with AWS CloudWatch Events for dynamic triggering. Expand Analyze Health Data to include advanced metrics (e.g., disk I/O via CloudWatch) or ML-based anomaly detection. Add more alert channels in Multi-Channel Alerts, such as Slack webhooks or PagerDuty integrations, by duplicating the WhatsApp/Email branches. Enhance Google Sheets Logging with charts or conditional formatting via Google Apps Script for visual dashboards. Implement approval gates in Restart Instance (e.g., via email confirmation) to prevent auto-restarts in sensitive environments. Explore More AI Workflows: Get in touch with us for custom n8n automation!
AI-Powered Invoice Processing Automation with Mistral OCR & GPT-5.2
π Automate Invoice Processing with an End-to-End AI Workflow Powered by GPT-5.2 Transform your invoice management with a fully automated, AI-driven invoice processing workflow built on n8n, combining Mistral AI OCR and OpenAI GPT-5.2 for unmatched accuracy, scalability, and speed. This intelligent document automation system automatically extracts, structures, validates, and standardizes invoice data from PDFs and scanned documentsβeliminating manual data entry and reducing accounting errors to near zero. π Key Features of This AI Invoice Automation Workflow β Advanced OCR for Invoice Recognition Powered by Mistral AIβs state-of-the-art OCR, optimized for: Complex invoice layouts Multi-language documents Scanned PDFs and low-quality images Tables, line items, and financial fields β Intelligent Invoice Data Extraction with GPT-5.2 Uses OpenAI GPT-5.2, the latest-generation language model, to: Understand invoice context and structure Identify vendors, customers, and payment terms Normalize inconsistent formats across suppliers Convert unstructured OCR text into clean, structured data β Multi-Page Invoice Processing Automatically merges and processes multi-page invoices, ensuring: Accurate line-item continuity Correct totals and tax calculations Reliable page-by-page data consolidation β Fully Automated, No-Code Workflow (n8n) From file upload to structured JSON output in seconds: Zero manual intervention Scalable for high invoice volumes Ideal for SMEs, enterprises, and finance teams β Custom JSON Schema for Accounting Systems Exports standardized invoice data ready for: ERP systems Accounting software Finance dashboards Data warehouses π Invoice Data Automatically Extracted Supplier and customer details Invoice number, issue date, due date Payment terms and currency Detailed line items (description, quantity, unit price, tax) Subtotals, VAT / tax breakdowns, grand totals User metadata and workflow query context π§ Technical Architecture & Workflow Overview This AI-powered invoice processing pipeline demonstrates how to: Monitor Google Drive for new invoice uploads Convert PDF or image files to Base64 Call Mistral AI OCR APIs with authentication Combine and clean multi-page OCR outputs Use GPT-5.2 AI agents with optimized system prompts Transform raw text into validated, structured JSON schemas Deliver production-ready data for downstream systems β‘ Getting Started in Minutes Create a Mistral AI account β https://console.mistral.ai/ Configure your OpenAI API key for GPT-5.2 Connect your Google Drive credentials Import the n8n workflow and run π πΌ Real-World Business Use Cases π Finance & Accounting Automation Automatic invoice capture and reconciliation Faster month-end closing Reduced human error π Accounts Payable & Expense Management Streamline vendor invoice processing Accelerate approval workflows Improve cash flow visibility π Document Digitization & Data Extraction Convert PDFs and scanned invoices into structured data Centralize document intelligence π Business Intelligence & Spend Analysis Analyze supplier spending Track cost categories Enable data-driven financial decisions π Why Combine OCR + GPT-5.2 for Invoice Processing? By combining best-in-class OCR technology with GPT-5.2βs deep contextual understanding, this workflow delivers: Higher extraction accuracy than rule-based systems Faster processing at scale Future-proof AI automation for finance operations π Keywords & SEO Tags invoiceProcessingAutomation AIInvoiceProcessing OCRInvoiceExtraction GPT52 OpenAIGPT52 MistralAI n8nAutomation AccountsPayableAutomation FinanceAutomation DocumentAI IntelligentDocumentProcessing InvoiceOCR
Fully automated AI video generation & multi-platform publishing
Description This comprehensive n8n automation template orchestrates a complete end-to-end workflow for generating engaging short-form Point-of-View (POV) style videos using multiple AI services and automatically publishing them across major social media platforms. It takes ideas from a Google Sheet and transforms them into finished videos with captions, voiceovers, and platform-specific descriptions, ready for distribution. Who Is This For? Content Creators & Agencies: Mass-produce unique short-form video content for various clients or channels with minimal manual effort. Digital Marketers: Automate video content pipelines to boost online presence and engagement across multiple platforms simultaneously. Social Media Managers: Schedule and distribute consistent video content efficiently without juggling multiple tools and manual uploads. Businesses: Leverage AI to create branded video content for marketing, reducing production time and costs. What Problem Does This Workflow Solve? Creating and distributing high-quality short-form video content consistently across multiple social networks is incredibly time-consuming and resource-intensive. This workflow tackles these challenges by: Automating Idea-to-Video Pipeline: Generates video concepts, image prompts, scripts, images, video clips, and voiceovers using AI. Streamlining Video Assembly: Automatically combines generated assets into a final video using a template. Generating Platform-Optimized Descriptions: Creates relevant descriptions for posts by transcribing the final video audio. Automating Multi-Platform Publishing: Uploads the final video and description to TikTok, Instagram, YouTube, Facebook, and LinkedIn simultaneously. Reducing Manual Workload: Drastically cuts down the time and effort required for video production and distribution. Centralized Tracking: Updates a Google Sheet with results, costs, and status for easy monitoring. How It Works Trigger & Input: Runs on a daily schedule (configurable) and fetches new video ideas from a designated Google Sheet. AI Content Generation: Uses OpenAI to generate video captions and image prompts based on the idea. Uses PiAPI (Flux) to generate images from prompts. Uses PiAPI (Kling) to generate video clips from the images (Image-to-Video). Uses OpenAI to generate a voiceover script based on the captions. Uses ElevenLabs to generate voiceover audio from the script and uploads it to Google Drive. Video Assembly: Combines the generated video clips, captions, and voiceover audio using a Creatomate template to render the final video. Description Generation: Uploads the final video to Google Drive, extracts the audio using OpenAI (Whisper), and generates a social media description using OpenAI (GPT). Multi-Platform Distribution: Uses upload-post.com to upload the final video and generated description to TikTok, Instagram, YouTube, Facebook, and LinkedIn. Tracking & Notification: Updates the original Google Sheet row with output details (video link, costs, tokens used) and sends a completion notification via Discord. Setup Accounts & API Keys: Obtain accounts and generate API keys/credentials for: n8n Google Cloud Platform (for Google Sheets & Google Drive APIs + OAuth Credentials) OpenAI PiAPI ElevenLabs Creatomate upload-post.com Discord (Webhook URL) Google Sheet: Make a copy of the provided Google Sheet Template and connect it in the Load Google Sheet node. Creatomate Template: Set up a video template in Creatomate (use the provided JSON source code as a base) and note its Template ID. Configure Nodes: Enter all API Keys/Credentials in the Set API Keys node and other relevant credential sections (Google nodes, upload-post nodes, etc.). Configure Google Drive nodes (Folder IDs, Permissions). Configure the upload-post.com nodes with your user identifier and necessary platform details (e.g., Facebook Page ID). Customize AI prompts within the OpenAI nodes (Generate Video Captions, Generate Image Prompts, Generate Script, Generate Description...) if desired. Set the Discord Webhook URL in the Notify me on Discord node. Enable Google APIs: Ensure Google Drive API and Google Sheets API are enabled in your Google Cloud Project. Requirements Accounts: n8n, Google (Sheets, Drive, Cloud Platform), OpenAI, PiAPI, ElevenLabs, Creatomate, The social media api Upload-Post, Discord. API Keys & Credentials: API Keys for OpenAI, PiAPI, ElevenLabs, Creatomate, upload-post.com. Google Cloud OAuth 2.0 Credentials. Discord Webhook URL. Templates: A configured Google Sheet based on the template, a configured Creatomate video template. (Potentially) Paid Plans: Some services (OpenAI, PiAPI, Creatomate, upload-post.com) may require paid plans depending on usage volume after free trials/credits are exhausted. Use this template to build a powerful, automated video content factory, scaling your production and distribution efforts across the social media landscape.