Back to Catalog
Dariusz Koryto

Dariusz Koryto

Total Views1,952
Templates4

Templates by Dariusz Koryto

Daily weather reports with OpenWeatherMap and Telegram Bot

Get automated weather updates delivered directly to your Telegram chat at scheduled intervals. This workflow fetches current weather data from OpenWeatherMap and sends formatted weather reports via a Telegram bot. Use Cases Daily morning weather briefings Regular weather monitoring for outdoor activities Automated weather alerts for specific locations Personal weather assistant for travel planning Prerequisites Before setting up this workflow, ensure you have: An OpenWeatherMap API account (free tier available) A Telegram bot token Your Telegram chat ID n8n instance (cloud or self-hosted) Setup Instructions Step 1: Create OpenWeatherMap Account Go to OpenWeatherMap and sign up for a free account Navigate to the API keys section in your account Copy your API key (you'll need this for the workflow configuration) Step 2: Create Telegram Bot Open Telegram and search for @BotFather Start a chat and use the /newbot command Follow the prompts to create your bot and get the bot token Save the bot token securely Step 3: Get Your Telegram Chat ID Start a conversation with your newly created bot Send any message to the bot Visit https://api.telegram.org/bot<YourBOTToken>/getUpdates in your browser Look for your chat ID in the response (it will be a number like 123456789) Step 4: Configure the Workflow Import this workflow into your n8n instance Configure each node with your credentials: Schedule Trigger Node Set your preferred schedule (default: daily at 8:00 AM) Use cron expression format (e.g., 0 8 * for 8 AM daily) Get Weather Node Add your OpenWeatherMap credentials Update the cityName parameter to your desired location Format: "CityName,CountryCode" (e.g., "London,UK") Send a text message Node Add your Telegram bot credentials (bot token) Replace XXXXXXX in the chatId field with your actual chat ID Customization Options Location Settings In the "Get Weather" node, modify the cityName parameter to change the location. You can specify: City name only: "Paris" City with country: "Paris,FR" City with state and country: "Miami,FL,US" Schedule Frequency In the "Schedule Trigger" node, adjust the cron expression: Every 6 hours: 0 /6 Twice daily (8 AM & 6 PM): 0 8,18 * Weekly on Mondays at 9 AM: 0 9 1 Message Format In the "Format Weather" node, you can customize the message template by modifying the message variable in the function code. Current format includes: Current temperature with "feels like" temperature Min/max temperatures for the day Weather description and precipitation Wind speed and direction Cloud coverage percentage Sunrise and sunset times Language Support In the "Get Weather" node, change the language parameter to get weather descriptions in different languages: English: "en" Spanish: "es" French: "fr" German: "de" Polish: "pl" Troubleshooting Common Issues Weather data not updating: Verify your OpenWeatherMap API key is valid and active Check if you've exceeded your API rate limits Ensure the city name format is correct Messages not being sent: Confirm your Telegram bot token is correct Verify the chat ID is accurate (should be a number, not username) Make sure you've started a conversation with your bot Workflow not triggering: Check if the workflow is activated (toggle switch should be ON) Verify the cron expression syntax is correct Ensure your n8n instance is running continuously Testing the Workflow Use the "Test workflow" button to run manually Check each node's output for errors Verify the final message format in Telegram Node Descriptions Schedule Trigger Automatically starts the workflow based on a cron schedule. Runs at specified intervals to fetch fresh weather data. Get Weather Connects to OpenWeatherMap API to retrieve current weather conditions for the specified location. Format Weather Processes the raw weather data and creates a user-friendly message with emojis and organized information. Send a text message Delivers the formatted weather report to your Telegram chat using the configured bot. Additional Features You can extend this workflow by: Adding weather alerts for specific conditions (temperature thresholds, rain warnings) Including weather forecasts for multiple days Sending reports to multiple chat recipients Adding location-based emoji selection Integrating with other notification channels (email, Slack, Discord) Security Notes Keep your API keys and bot tokens secure Don't share your chat ID publicly Consider using n8n's credential system for storing sensitive information Regularly rotate your API keys for better security Special thanks to Arkadiusz, the only person who supports me in n8n mission to make automation great again.

Dariusz KorytoBy Dariusz Koryto
1171

Transfer files from FTP server to Google Drive

FTP to Google Drive Transfer Template What This Template Does This workflow automatically transfers files from an FTP server to Google Drive. It's perfect for: Backing up files from remote servers Migrating data from FTP to cloud storage Automating file synchronization tasks Creating scheduled backups of server content How It Works The workflow follows these steps: Manual Trigger - You start the process by clicking "Execute" Lists FTP Directory - Scans the specified FTP folder for all items Filters Files Only - Separates actual files from directories (folders) Downloads Files - Retrieves each file as binary data from the FTP server Uploads to Google Drive - Stores all downloaded files in your specified Google Drive folder Requirements Before using this template, you'll need: FTP Server Access: Server address, username, and password Google Drive Account: With OAuth2 authentication set up in n8n n8n Instance: Self-hosted or cloud version Setup Instructions Step 1: Configure FTP Credentials In n8n, go to Settings โ†’ Credentials Create a new FTP credential Enter your FTP server details: Host: Your FTP server address Port: Usually 21 for FTP Username: Your FTP username Password: Your FTP password Test the connection and save Step 2: Set Up Google Drive Authentication Create a new Google Drive OAuth2 credential Follow n8n's Google Drive setup guide: Create a Google Cloud project Enable Google Drive API Create OAuth2 credentials Add your n8n callback URL Authorize the connection in n8n Step 3: Configure the Workflow Update FTP Path: Open the "List FTP Directory" node Change the path parameter from /_instalki to your desired FTP folder Set Google Drive Folder: Open the "Upload to Google Drive" node Replace the folderId with your target Google Drive folder ID To find folder ID: Open the folder in Google Drive and copy the ID from the URL Assign Credentials: Ensure both FTP nodes use your FTP credential Assign your Google Drive credential to the upload node How to Use Test First: Run the workflow manually with a few test files Monitor Execution: Check the execution log for any errors Verify Upload: Confirm files appear in your Google Drive folder Schedule (Optional): Add a schedule trigger if you want automatic runs Customization Options Filter Specific File Types Add a condition after "Filter Files Only" to process only certain file extensions: {{ $json.name.endsWith('.pdf') || $json.name.endsWith('.jpg') }} Add Error Handling Insert error-handling nodes to manage failed downloads or uploads gracefully. Organize by Date Modify the Google Drive upload to create date-based folders automatically. File Size Limits Add checks for file size before attempting upload (Google Drive has limits). Troubleshooting Common Issues: FTP Connection Failed: Check server address, port, and credentials Google Drive Upload Error: Verify OAuth2 setup and folder permissions Files Not Found: Ensure the FTP path exists and contains files Large Files: Consider Google Drive's file size limitations (15GB for free accounts) Tips: Test with small files first Check n8n execution logs for detailed error messages Ensure your Google Drive has sufficient storage space Verify FTP server allows multiple concurrent connections Security Notes Never hardcode credentials in the workflow Use n8n's credential system for all authentication Consider using SFTP instead of FTP for better security Regularly rotate your FTP passwords Review Google Drive sharing permissions Next Steps Once you have this basic transfer working, you might want to: Add email notifications for successful/failed transfers Implement file deduplication checks Create logs of transferred files Set up automatic cleanup of old files Add file compression before upload

Dariusz KorytoBy Dariusz Koryto
417

Automated FTP file migration with smart cleanup and email notifications

Automated FTP File Migration with Smart Cleanup and Email Notifications Overview This n8n workflow automates the secure transfer of files between FTP servers on a scheduled basis, providing enterprise-grade reliability with comprehensive error handling and dual notification systems (email + webhook). Perfect for data migrations, automated backups, and multi-server file synchronization. What it does This workflow automatically discovers, filters, transfers, and safely removes files between FTP servers while maintaining complete audit trails and sending detailed notifications about every operation. Key Features: Scheduled Execution: Configurable timing (daily, hourly, weekly, or custom cron expressions) Smart File Filtering: Regex-based filtering by file type, size, date, or name patterns Safe Transfer Protocol: Downloads โ†’ Uploads โ†’ Validates โ†’ Cleans up source Dual Notifications: Email alerts + webhook integration for both success and errors Comprehensive Logging: Detailed audit trail of all operations with timestamps Error Recovery: Automatic retry logic with exponential backoff for network issues Production Ready: Built-in safety measures and extensive documentation Use Cases ๐Ÿข Enterprise & IT Operations Data Center Migration: Moving files between different hosting environments Backup Automation: Scheduled transfers to secondary storage locations Multi-Site Synchronization: Keeping files in sync across geographic locations Legacy System Integration: Bridging old and new systems through automated transfers ๐Ÿ“Š Business Operations Document Management: Automated transfer of contracts, reports, and business documents Media Asset Distribution: Moving images, videos, and marketing materials between systems Data Pipeline: Part of larger ETL processes for business intelligence Compliance Archiving: Moving files to compliance-approved storage systems ๐Ÿ”ง Development & DevOps Build Artifact Distribution: Deploying compiled applications across environments Configuration Management: Synchronizing config files between servers Log File Aggregation: Collecting logs from multiple servers for analysis Automated Deployment: Moving release packages to production servers How it works ๐Ÿ“‹ Workflow Steps Schedule Trigger โ†’ Initiates workflow at specified intervals File Discovery โ†’ Lists files from source FTP server with optional recursion Smart Filtering โ†’ Applies customizable filters (type, size, date, name patterns) Secure Download โ†’ Retrieves files to temporary n8n storage with retry logic Safe Upload โ†’ Transfers files to destination with directory auto-creation Transfer Validation โ†’ Verifies successful upload before proceeding Source Cleanup โ†’ Removes original files only after confirmed success Comprehensive Logging โ†’ Records all operations with detailed metadata Dual Notifications โ†’ Sends email + webhook notifications for success/failure ๐Ÿ”„ Error Handling Flow Network Issues โ†’ Automatic retry with exponential backoff (3 attempts) Authentication Problems โ†’ Immediate email alert with troubleshooting steps Permission Errors โ†’ Detailed logging with recommended actions Disk Space Issues โ†’ Safe failure with source file preservation File Corruption โ†’ Integrity validation with rollback capability Setup Requirements ๐Ÿ”‘ Credentials Needed Source FTP Server Host, port, username, password Read permissions required SFTP recommended for security Destination FTP Server Host, port, username, password Write permissions required Directory creation permissions SMTP Email Server SMTP host and port (e.g., smtp.gmail.com:587) Authentication credentials For success and error notifications Monitoring API (Optional) Webhook URL for system integration Authentication tokens if required โš™๏ธ Configuration Steps Import Workflow โ†’ Load the JSON template into your n8n instance Configure Credentials โ†’ Set up all required FTP and SMTP connections Customize Schedule โ†’ Adjust cron expression for your timing needs Set File Filters โ†’ Configure regex patterns for your file types Configure Paths โ†’ Set source and destination directory structures Test Thoroughly โ†’ Run with test files before production deployment Enable Monitoring โ†’ Activate email notifications and logging Customization Options ๐Ÿ“… Scheduling Examples cron 0 2 * Daily at 2 AM 0 /6 Every 6 hours 0 8 1-5 Weekdays at 8 AM 0 0 1 Monthly on 1st /15 * Every 15 minutes ๐Ÿ” File Filter Patterns regex Documents \\.(pdf|doc|docx|xls|xlsx)$ Images \\.(jpg|jpeg|png|gif|svg)$ Data Files \\.(csv|json|xml|sql)$ Archives \\.(zip|rar|7z|tar|gz)$ Size-based (add as condition) {{ $json.size > 1048576 }} Files > 1MB Date-based (recent files only) {{ $json.date > $now.minus({days: 7}) }} ๐Ÿ“ Directory Organization javascript // Date-based structure /files/{{ $now.format('YYYY/MM/DD') }}/ // Type-based structure /files/{{ $json.name.split('.').pop() }}/ // User-based structure /users/{{ $json.owner || 'system' }}/ // Hybrid approach /{{ $now.format('YYYY-MM') }}/{{ $json.type }}/ Template Features ๐Ÿ›ก๏ธ Safety & Security Transfer Validation: Confirms successful upload before source deletion Error Preservation: Source files remain intact on any failure Audit Trail: Complete logging of all operations with timestamps Credential Security: Secure storage using n8n's credential system SFTP Support: Encrypted transfers when available Retry Logic: Automatic recovery from transient network issues ๐Ÿ“ง Notification System Success Notifications: Confirmation email with transfer details File metadata (name, size, transfer time) Next scheduled execution information Webhook payload for monitoring systems Error Notifications: Immediate email alerts with error details Troubleshooting steps and recommendations Failed file information for manual intervention Webhook integration for incident management ๐Ÿ“Š Monitoring & Analytics Execution Logs: Detailed history of all workflow runs Performance Metrics: Transfer speeds and success rates Error Tracking: Categorized failure analysis Audit Reports: Compliance-ready activity logs Production Considerations ๐Ÿš€ Performance Optimization File Size Limits: Configure timeouts based on expected file sizes Batch Processing: Handle multiple files efficiently Network Optimization: Schedule transfers during off-peak hours Resource Monitoring: Track n8n server CPU, memory, and disk usage ๐Ÿ”ง Maintenance Regular Testing: Validate credentials and connectivity Log Review: Monitor for patterns in errors or performance Credential Rotation: Update passwords and keys regularly Documentation Updates: Keep configuration notes current Testing Protocol ๐Ÿงช Pre-Production Testing Phase 1: Test with 1-2 small files (< 1MB) Phase 2: Test error scenarios (invalid credentials, network issues) Phase 3: Test with representative file sizes and volumes Phase 4: Validate email notifications and logging Phase 5: Full production deployment with monitoring โš ๏ธ Important Testing Notes Disable Source Deletion during initial testing Use test directories to avoid production data impact Monitor execution logs carefully during testing Validate email delivery to ensure notifications work Test rollback procedures before production use Support & Documentation This template includes: 8 Comprehensive Sticky Notes with visual documentation Detailed Node Comments explaining every configuration option Error Handling Guide with common troubleshooting steps Security Best Practices for production deployment Performance Tuning recommendations for different scenarios Technical Specifications n8n Version: 1.0.0+ Node Count: 17 functional nodes + 8 documentation sticky notes Execution Time: 2-10 minutes (depending on file sizes and network speed) Memory Usage: 50-200MB (scales with file sizes) Supported Protocols: FTP, SFTP (recommended) File Size Limit: Up to 150MB per file (configurable) Concurrent Files: Processes files sequentially for stability Who is this for? ๐ŸŽฏ Primary Users System Administrators managing file transfers between servers DevOps Engineers automating deployment and backup processes IT Operations Teams handling data migration projects Business Process Owners requiring automated file management ๐Ÿ’ผ Industries & Use Cases Healthcare: Patient data archiving and compliance reporting Financial Services: Secure document transfer and regulatory reporting Manufacturing: CAD file distribution and inventory data sync E-commerce: Product image and catalog management Media: Asset distribution and content delivery automation

Dariusz KorytoBy Dariusz Koryto
199

Automated Google Drive to FTP transfer with JSON logging & reports

Google Drive to FTP Transfer Workflow - Setup Guide Overview This n8n workflow automatically transfers files from Google Drive to an FTP server on a scheduled basis. It includes comprehensive logging, email notifications, and error handling. Features Automated Scheduling: Runs every 6 hours (customizable) Manual Trigger: Webhook endpoint for on-demand transfers File Filtering: Supports specific file types and size limits Comprehensive Logging: Detailed transfer reports saved to Google Drive Email Notifications: HTML reports sent after each run Error Handling: Graceful handling of failed transfers Batch Processing: Files processed individually to prevent rate limits Prerequisites Before setting up this workflow, ensure you have: n8n instance running (self-hosted or cloud) Google Drive account with files to transfer FTP server with upload permissions Email service for sending reports (SMTP) Step-by-Step Setup Instructions Google Drive API Setup 1.1 Create Google Cloud Project Go to Google Cloud Console Create a new project or select existing one Enable the Google Drive API: Navigate to "APIs & Services" โ†’ "Library" Search for "Google Drive API" Click "Enable" 1.2 Create OAuth2 Credentials Go to "APIs & Services" โ†’ "Credentials" Click "Create Credentials" โ†’ "OAuth client ID" Configure consent screen if prompted Choose "Web application" as application type Add your n8n instance URL to authorized redirect URIs: https://your-n8n-instance.com/rest/oauth2-credential/callback Note down the Client ID and Client Secret 1.3 Configure n8n Credential In n8n, go to "Credentials" โ†’ "Add Credential" Select "Google Drive OAuth2 API" Enter your Client ID and Client Secret Complete OAuth flow by clicking "Connect my account" Set credential ID as: your-google-drive-credentials-id FTP Server Setup 2.1 FTP Server Requirements Ensure FTP server is accessible from your n8n instance Verify you have upload permissions Note the server details: Host/IP address Port (usually 21 for FTP) Username and password Destination directory path 2.2 Configure n8n FTP Credential In n8n, go to "Credentials" โ†’ "Add Credential" Select "FTP" Enter your FTP server details: Host: your-ftp-server.com Port: 21 (or your custom port) Username: your-ftp-username Password: your-ftp-password Set credential ID as: your-ftp-credentials-id Email Setup (SMTP) 3.1 Choose Email Provider Configure SMTP settings for one of these providers: Gmail: smtp.gmail.com, port 587, use App Password Outlook: smtp-mail.outlook.com, port 587 Custom SMTP: Your organization's SMTP server 3.2 Configure n8n Email Credential In n8n, go to "Credentials" โ†’ "Add Credential" Select "SMTP" Enter your SMTP details: Host: smtp.gmail.com (or your provider) Port: 587 Security: STARTTLS Username: your-email@example.com Password: your-app-password Set credential ID as: your-email-credentials-id Workflow Configuration 4.1 Import Workflow Copy the workflow JSON from the artifact above In n8n, click "Import from JSON" Paste the workflow JSON and import 4.2 Update Credential References Google Drive nodes: Verify credential ID matches your-google-drive-credentials-id FTP node: Verify credential ID matches your-ftp-credentials-id Email node: Verify credential ID matches your-email-credentials-id 4.3 Customize Parameters FTP Server Settings (Upload to FTP node) javascript { "host": "your-ftp-server.com", // Replace with your FTP host "username": "your-ftp-username", // Replace with your FTP username "password": "your-ftp-password", // Replace with your FTP password "path": "/remote/directory/{{ $json.validFiles[$json.batchIndex].name }}", // Update destination path "port": 21 // Change if using different port } Email Settings (Send Report Email node) javascript { "sendTo": "admin@yourcompany.com", // Replace with your email address "subject": "Google Drive to FTP File Transfer - Report" } File Filter Settings (Filter & Validate Files node) In the JavaScript code, update these settings: javascript const transferNotes = { settings: { maxFileSizeMB: 50, // Change maximum file size allowedExtensions: [ // Add/remove allowed file types '.pdf', '.doc', '.docx', '.txt', '.jpg', '.png', '.zip', '.xlsx' ], autoDeleteAfterTransfer: false, // Set to true to delete from Drive after transfer verifyTransfer: true // Keep true for verification } }; Google Drive Notes Storage (Upload Notes to Drive node) javascript { "parents": { "parentId": "your-notes-folder-id" // Replace with actual folder ID from Google Drive } } Schedule Configuration 5.1 Modify Schedule Trigger In the "Schedule Trigger" node, adjust the interval: javascript { "rule": { "interval": [ { "field": "hours", "hoursInterval": 6 // Change to desired interval (hours) } ] } } Alternative schedule options: Daily: "field": "days", "daysInterval": 1 Weekly: "field": "weeks", "weeksInterval": 1 Custom cron: Use cron expression for complex schedules 5.2 Webhook Configuration The webhook trigger is available at: POST https://your-n8n-instance.com/webhook/webhook-transfer-status Use this for manual triggers or external integrations. Testing and Validation 6.1 Test Connections Test Google Drive: Run "Get Drive Files" node manually Test FTP: Upload a test file using "Upload to FTP" node Test Email: Send a test email using "Send Report Email" node 6.2 Run Test Transfer Activate the workflow Click "Execute Workflow" to run manually Monitor execution in the workflow editor Check for any error messages or failed nodes 6.3 Verify Results FTP Server: Confirm files appear in destination directory Email: Check you receive the transfer report Google Drive: Verify transfer notes are saved to specified folder Monitoring and Maintenance 7.1 Workflow Monitoring Execution History: Review past runs in n8n interface Error Logs: Check failed executions for issues Performance: Monitor execution times and resource usage 7.2 Regular Maintenance Credential Renewal: Google OAuth tokens may need periodic renewal Storage Cleanup: Consider archiving old transfer notes Performance Tuning: Adjust batch sizes or schedules based on usage Troubleshooting 8.1 Common Issues Google Drive Authentication Errors: Verify OAuth2 credentials are correctly configured Check if Google Drive API is enabled Ensure redirect URI matches n8n instance URL FTP Connection Failures: Verify FTP server credentials and connectivity Check firewall settings allow FTP connections Confirm destination directory exists and has write permissions Email Delivery Issues: Verify SMTP credentials and server settings Check if email provider requires app-specific passwords Ensure sender email is authorized File Transfer Failures: Check file size limits in filter settings Verify allowed file extensions include your file types Monitor FTP server disk space 8.2 Debug Mode Enable debug mode by: Adding console.log statements in code nodes Using "Execute Workflow" with step-by-step execution Checking node outputs for data validation Advanced Customizations 9.1 Additional File Filters Add custom filtering logic in the "Filter & Validate Files" node: javascript // Example: Filter by modification date const isRecentFile = new Date(file.modifiedTime) &gt; new Date(Date.now() - 7 24 60 60 1000); // Last 7 days // Example: Filter by folder location const isInSpecificFolder = file.parents && file.parents.includes('specific-folder-id'); 9.2 Enhanced Reporting Customize the email report template in "Send Report Email" node: html <h2>๐Ÿ“Š File Transfer Report</h2> <div> <h3>Summary</h3> <ul> <li><strong>Date:</strong> {{ new Date().toLocaleString('en-US') }}</li> <li><strong>Success Rate:</strong> {{ Math.round((successfulTransfers / totalFiles) * 100) }}%</li> </ul> </div> 9.3 Integration with Other Services Add nodes to integrate with: Slack: Send notifications to team channels Discord: Post updates to Discord servers Webhook: Trigger other workflows or systems Database: Log transfers to MySQL, PostgreSQL, etc. Security Considerations 10.1 Credential Security Use environment variables for sensitive data Regularly rotate FTP and email passwords Implement least-privilege access for service accounts 10.2 Network Security Use SFTP instead of FTP when possible Implement VPN connections for sensitive transfers Monitor network traffic for unusual patterns 10.3 Data Privacy Ensure compliance with data protection regulations Implement data retention policies for transfer logs Consider encryption for sensitive file transfers Support and Resources Documentation Links n8n Documentation Google Drive API Documentation n8n Community Forum Getting Help If you encounter issues: Check the troubleshooting section above Review n8n execution logs for error details Search the n8n community forum for similar issues Create a support ticket with detailed error information --- Note: Replace all placeholder values (URLs, credentials, IDs) with your actual configuration before running the workflow.

Dariusz KorytoBy Dariusz Koryto
165
All templates loaded