Development & IT Workflows
Software development and IT operations
Back Up Your n8n Workflows on GitHub
This workflow will backup your workflows to GitHub. It uses the public API to export all of the workflow data using the n8n node. It then loops over the data, checks in GitHub to see if a file exists that uses the workflow name. Once checked, it will then update the file on GitHub if it exists, create a new file if it doesn't exist, and if it's the same, it will ignore the file. ### Config Options **repo_owner** - GitHub owner **repo_name** - GitHub repository name **repo_path** - Path within the GitHub repository This workflow has been updated to use the n8n node and the code node, so it requires at least version 0.198.0 of n8n.
n8n$14.99Automate Monitoring of Multiple GitHub Repositories with Webhooks
This workflow enables efficient monitoring of multiple GitHub repositories using webhooks, eliminating the need for constant polling. It allows for easy addition and removal of repositories from your watchlist, streamlining management.
n8n$14.99Automate Daily n8n Workflow Backups to Nextcloud with 7-Day Retention
This workflow automates the daily backup of n8n workflows to Nextcloud, ensuring the last 7 days of backups are retained while older ones are deleted to save space.
n8n$9.99Automate GitLab Merge Requests Using APIs with n8n
# **Who is this template for?** This template is designed for developers, DevOps engineers, and automation enthusiasts who want to streamline their GitLab merge request process using n8n, a low-code workflow automation tool. It eliminates manual intervention by automating the merging of GitLab branches through API calls. # **How it works?** - **Trigger the workflow**: The workflow can be triggered by a webhook, a scheduled event, or a GitLab event (e.g., a new merge request is created or approved). - **Fetch Merge Request Details**: n8n makes an API call to GitLab to retrieve merge request details. - **Check Merge Conditions**: The workflow validates whether the merge request meets predefined conditions (e.g., approvals met, CI/CD pipelines passed). - **Perform the Merge**: If all conditions are met, n8n sends a request to the GitLab API to merge the branch automatically. # **Setup Steps** **1. Prerequisites** - An n8n instance (Self-hosted or Cloud) - A GitLab personal access token with API access - A GitLab repository with merge requests enabled **2. Create the n8n Workflow** - Set up a trigger: Choose a trigger node (Webhook, Cron, or GitLab Trigger). - Fetch merge request details: Add an HTTP Request node to call GET /merge_requests/:id from GitLab API. - Validate conditions: - Check if the merge request has necessary approvals. - Ensure CI/CD pipelines have passed. - Merge the request: - Use an HTTP Request node to call PUT /merge_requests/:id/merge API. **3. Test the Workflow** - Create a test merge request. - Check if the workflow triggers and merges automatically. - Debug using n8n logs if needed. **4. Deploy and Monitor** - Deploy the workflow in production. - Use n8n's monitoring features to track execution. This template enables seamless GitLab merge automation, improving efficiency and reducing manual work! #### Note: Never hard code API token or secret in your HTTP request.
n8n$9.99Kubernetes RCA and Alerting Using Gemini, Loki, Prometheus, Slack
## Summary This n8n workflow automates Kubernetes root cause analysis (RCA) and incident alerting by integrating with Loki, Prometheus, and Slack. It streamlines log collection, cluster health monitoring, and AI-driven RCA with Gemini, saving DevOps teams hours of manual troubleshooting. Designed for production-grade Kubernetes environments, this plug-and-play workflow delivers actionable insights directly to your Slack channels. ## Who's It For - DevOps Engineers automating Kubernetes monitoring and incident response. - Site Reliability Engineers (SREs) aiming to reduce mean time to resolution (MTTR). - Teams using n8n, Slack, Loki, and Prometheus for observability and automation. ## What It Does - Pulls logs from Loki, filtering for critical errors. - Monitors cluster health, checking pending, not ready, or restarting pods. - Fetches Prometheus metrics for nodes, namespaces, and services. - Generates AI-driven RCA using Google Gemini to analyze logs and metrics. - Sends formatted Slack alerts with deduplication and batching for readability. - Tracks pod lifecycle events, including crashloop states and restarts. ## How It Works - Log Collection: The workflow uses an n8n HTTP Request node to pull logs from Loki, filtering for critical errors. - Cluster Monitoring: A Kubernetes SSH node checks pod states (terminated or running). If terminated, ignore those pods for RCA. - Metrics Fetching: Prometheus metrics are retrieved via HTTP Request for nodes and services. - RCA Generation: Logs and metrics are merged into structured prompts for Google Gemini AI to produce actionable RCA insights. - Kubernetes Enrichment: RCA from Gemini goes to this node and enriches with Kubernetes documentation and provides the documentation links in RCA. - Slack Notifications: Alerts are batched, deduplicated, and sent to Slack with clear formatting. ## How to Set Up - Import the Workflow: Download the .json file and import it into your n8n instance. ### Configure Credentials: - Add your Loki, Prometheus, and Slack API credentials in the respective nodes (use n8n Credentials Manager if required). - Set up Google Gemini AI credentials for RCA generation. - Test the Workflow: Run the workflow manually to ensure logs, metrics, and alerts are processed correctly. - Schedule Execution: Use n8n's Schedule Trigger to run the workflow at desired intervals (e.g., every 5 minutes). ## Requirements - n8n K8s node installed (self-hosted only, see n8n documentation). - Access to Kubernetes clusters and API. - Loki and Prometheus set up for log and metrics collection. - Slack workspace with webhook access for notifications. - Google Gemini AI API key for RCA generation. ## How to Customize the Workflow - Adjust Filters: Modify the Loki query in the HTTP Request node to focus on specific error patterns. - Change Alert Frequency: Update the Schedule Trigger node for different intervals. - Add More Metrics: Extend the Prometheus node to include additional metrics like CPU or memory usage. - Customize Slack Alerts: Edit the Slack node to change message formatting or add more channels. - Enhance RCA: Adjust the Gemini AI prompt in the Set Fields node for more specific insights. ## Category DevOps / Monitoring & Observability / Kubernetes / AI ## Tags kubernetes, prometheus, slack, alerting, sre, ops, kube-state-metrics, Gemini, AI ## Slack Output 
n8n$24.99Automate n8n Workflow Backups and Documentation to GitLab
Automatically back up your n8n workflows to a GitLab repository and generate AI-powered documentation whenever workflows are updated or activated.
n8n$9.99Restore and Recover n8n Credentials from Google Drive Backups with Duplication Protection
**This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n.** ## **Restore n8n Credentials from Google Drive Backup** This template enables you to **restore your n8n credentials from a backup file in Google Drive**. It's an essential companion to a credential backup workflow, ensuring you can recover your setup in case of data loss, instance migration, or disaster recovery. The workflow **intelligently checks for existing credentials to prevent accidental overwrites of credentials** with the same name that are already present. This workflow is manually triggered. We recommend you use this restore workflow in conjunction with a backup solution like our [Auto Backup Credentials to Google Drive template](https://aiautomationpro.org/products/n8n-auto-backup-credentials-to-google-drive/). For more powerful n8n templates, visit our website or contact us at [**AI Automation Pro**](https://aiautomationpro.org/). We help your business build custom AI workflow automation and apps. ### Who is this for? This workflow is for n8n administrators and users who have backed up their n8n credentials to Google Drive (e.g., using a companion backup template) and need to restore them to the same or a different n8n instance. It's crucial for those managing self-hosted instances. ### What problem is this workflow solving? / use case If an n8n instance becomes corrupted, needs to be migrated, or if credentials are accidentally deleted, a manual re-creation of all credentials can be extremely time-consuming and error-prone. This workflow automates the restoration process from a known backup, saving significant time and ensuring accuracy. It's particularly useful for: - Disaster recovery. - Migrating n8n instances. - Quickly setting up a new n8n instance with existing credentials. ### What this workflow does The workflow is manually triggered and performs the following operations: 1. **Fetch Current Credentials:** - An On Click trigger starts the process. - It executes the command `npx n8n export:credentials --all --decrypted` via the Execute Command Get All Credentials node to get a list of all credentials currently in your n8n instance. - This list is then processed by JSON Formatting Data and Aggregate Credentials nodes to extract just the names of existing credentials for comparison. 2. **Download Backup File from Google Drive:** - The Google Drive Get Credentials File node searches your Google Drive for the `n8n_backup_credentials.json` file. - The Google Drive Download File node then downloads the found file. 3. **Process Backup Data:** - The Convert Files to JSON (an Extract From File node) converts the downloaded file content, expected to be JSON, into a usable JSON object. - Split Out nodes then process this data to handle individual credential entries from the backup file. 4. **Loop and Restore Credentials:** - The Loop Over Items (a SplitInBatches node) iterates through each credential from the backup file. - **Duplicate Check:** For each credential, an IF node (Check For Skipped Credentials) checks two conditions using an OR combinator: - If the credential name from the backup (`$(Loop Over Items).item.json.name`) is empty. - If a credential with the same name already exists in the current n8n instance (by checking against the list from the Aggregate Credentials node). - **Conditional Restore:** If the credential name is NOT empty AND it does NOT already exist (i.e., the conditions in the IF node are false), the workflow proceeds to the Restore N8n Credentials node (an n8n API node). This node uses the `name`, `type`, and `data` for each new credential from the backup file to create it in the n8n instance. Credentials with empty names or those already present are skipped as they take the true path of the IF node, which loops back. - A Wait node introduces a 1-second delay after each restoration attempt, to prevent API rate limiting before looping to the next item. ### Step-by-step setup 1. **n8n Instance Environment (for current credentials check):** - The n8n instance must have access to `npx` and `n8n-cli` for the Execute Command Get All Credentials node to function. 2. **Google Drive Credentials:** - Configure the Google Drive Get Credentials File and Google Drive Download File nodes with your Google OAuth2 credentials. 3. **n8n API Credentials:** - Configure the Restore N8n Credentials node with your n8n API credentials. This API key needs permissions to manage credentials. 4. **Backup File Name:** - The workflow is configured to search for a file named `n8n_backup_credentials.json` in the Google Drive Get Credentials File node. If your backup file has a different name or you want to specify a path, update the Query String parameter in this node. ### How to customize this workflow to your needs * **Backup**
n8n$9.99Automate Remote Server File Integrity Checks with Slack Alerts
This workflow automates the process of monitoring file integrity on a remote server and sends alerts via Slack if discrepancies are detected. It ensures that any unauthorized changes to critical files are promptly reported.
n8n$4.99Deploy a Comprehensive Microsoft SharePoint MCP Server for AI Integration
Set up a Microsoft SharePoint MCP server to seamlessly integrate with AI agents, enabling all 11 SharePoint operations with zero configuration.
n8n$14.99Automate Image Uploads to Postimages.org with Airtop
Streamline the process of uploading screenshots to Postimages.org using Airtop browser automation, ideal for repetitive QA tasks and archiving visual data.
n8n$9.99Retrieve and Aggregate Public IP Addresses for n8n Instance
Automatically fetch and aggregate the public IP addresses of your n8n instance for integration with services requiring firewall whitelisting.
n8n$4.99Automated Weekly Network Security Monitoring with Shodan and TheHive
This n8n workflow runs every Monday at 5:00 AM to monitor network security by analyzing IP addresses and ports using Shodan. It identifies unexpected open ports and generates alerts in TheHive for incident response.
n8n$9.99Automate Phishing Email Detection and Reporting with n8n
Streamline the detection and reporting of phishing emails by automating analysis and incident logging with n8n, Gmail, Microsoft Outlook, and Jira.
n8n$14.99Automate Threat Intelligence Ingestion and Triage with OpenAI and Email Alerts
This workflow automates the ingestion of threat intelligence from CVE and IOC feeds, evaluates risks using OpenAI, and sends actionable alerts via email.
n8n$14.99Automate PostgreSQL & MySQL Management on Linux Servers
This n8n workflow automates the installation, configuration, and management of PostgreSQL and MySQL databases on Linux servers, enabling efficient setup, creation, and deletion of databases with user access in just 10 seconds.
n8n$9.99Automatically Update n8n Version
# n8n Workflow: Check and Update n8n Version This workflow automatically **checks if the local n8n version is outdated** and, if so, **creates a file to signal an update is needed**. --- ## Working Environment - **Operating System:** Ubuntu 24.04 - **n8n Installation:** Docker container --- ## Project Directory Structure n8n/ ├── check_update.txt ├── check-update.sh ├── compose.yml └── update_n8n.cron --- ## File Descriptions ### `check_update.txt` Contains a single word: - `true`: Update is needed - `false`: No update required --- ### `check-update.sh` ```bash #!/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin if grep -q true /home/sysadmin/n8n/check_update.txt; then # Place your update logic here echo "Update needed - please insert update logic" echo true > /home/sysadmin/n8n/check_update.txt fi ``` **Purpose:** - Checks the contents of `check_update.txt` - If it contains `true`, executes update logic (currently a placeholder) - Resets `check_update.txt` to `true` --- ### `update_n8n.cron` ```cron SHELL=/bin/sh 10 5 * * * /bin/sh /home/sysadmin/n8n/check-update.sh ``` **Purpose:** - Runs the `check-update.sh` script daily at 5:10 AM - Uses `/bin/sh` as the shell environment ## n8n Workflow Breakdown ### 1. Schedule Trigger - **Purpose:** Triggers the workflow every day at 5:00 AM - **Node Type:** Schedule Trigger --- ### 2. Get the latest n8n version - **Purpose:** Fetches the latest version of n8n from npm - **Endpoint:** `https://registry.npmjs.org/n8n/latest` - **Node Type:** HTTP Request --- ### 3. Get Local n8n version - **Purpose:** Retrieves the currently running n8n version - **Endpoint:** `http://192.168.100.18:5678/rest/settings` - **Node Type:** HTTP Request --- ### 4. If - **Purpose:** Compares the local and latest versions - **Condition:** If not equal, an update is needed --- ### 5. SSH - **Purpose:** Writes the result to a file on the host via SSH - **Logic:** ```bash echo {{ $(If).params.conditions ? false : true }} > check_update.txt ``` **Effect**: Updates `check_update.txt` with `true` if an update is needed, `false` otherwise. ## Setting up Crontab on Ubuntu ### 1. Register the cron job with: ```bash crontab update_n8n.cron ``` ### 2. Verify that your cron job is registered: ```bash crontab -l ``` ## Result - **5:00 AM** - n8n workflow checks versions and writes result to `check_update.txt` - **5:10 AM** - Cron runs `check-update.sh` to respond to update flag
n8n$4.99Automate Lead Generation and Qualification with Google Maps, OpenAI, and HubSpot
This n8n workflow automates the process of generating and qualifying leads by scraping data from Google Maps and Yellow Pages, enriching it with AI, and exporting qualified leads to HubSpot.
n8n$14.99Automated Security Alert Analysis with Sophos, Gemini AI, and VirusTotal
## **How It Works** This workflow automates the analysis of security alerts from Sophos Central, turning raw events into actionable intelligence. It uses the official Sophos SIEM integration tool to fetch data, enriches it with VirusTotal, and leverages Google Gemini to provide a real-time threat summary and mitigation plan via Telegram. Prerequisite (Important): This workflow is triggered by a webhook that receives data from an external Python script. You must first set up the Sophos-Central-SIEM-Integration script from the official Sophos GitHub. This script will fetch data and forward it to your n8n webhook URL. Tool Source Code: [Sophos/Sophos-Central-SIEM-Integration](Sophos/Sophos-Central-SIEM-Integration) ## **The n8n Workflow Steps** **Webhook**: Receives enriched event and alert data from the external Python script. **IF (Filter)**: Immediately filters the incoming data to ensure only events with a high or critical severity are processed, reducing noise from low-priority alerts. **Code (Prepare Indicator)**: Intelligently inspects the Sophos event data to extract the primary threat indicator. It prioritizes indicators in the following order: File Hash (SHA256), URL/Domain, or Source IP. **HTTP Request (VirusTotal)**: The extracted indicator is sent to the VirusTotal API to get a detailed reputation report, including how many security vendors flagged it as malicious. **Code (Prompt for Gemini)**: The raw JSON output from VirusTotal is processed into a clean, human-readable summary and a detailed list of flagging vendors. **AI Agent (Google Gemini)**: All collected data—the original Sophos log, the full alert details, and the formatted VirusTotal reputation—is compiled into a detailed prompt for Gemini. The AI acts as a virtual SOC analyst to: - Create a concise incident summary. - Determine the risk level. - Provide a list of concrete, actionable mitigation steps. **Telegram**: The complete analysis and mitigation plan from Gemini is formatted into a clean, easy-to-read message and sent to your specified Telegram chat. ## **Setup Instructions** Configure the external Python script to forward events to this workflow's Production URL. In n8n, create Credentials for Google Gemini, VirusTotal, and Telegram. Assign the newly created credentials to the corresponding nodes in the workflow.
n8n$9.99Automate JavaScript Security Scanning and Reporting via Email
This workflow automates the detection of sensitive information in JavaScript files from a specified URL and sends a detailed security report via email. Ideal for developers and ethical hackers to ensure code security and compliance.
n8n$9.99Automate Bug Tracking with GitHub Issues and Telegram Alerts Using AI
Streamline bug tracking by creating GitHub issues from webhook inputs, classifying them with AI, and sending alerts via Telegram. This workflow enhances efficiency by automating the classification and notification of critical issues.
n8n$14.99Automate Security Log Monitoring and Slack Alerts for Failed Logins
This workflow automates the detection of failed login attempts by analyzing security logs and sending alerts via Slack. It helps in identifying potential security threats swiftly and efficiently.
n8n$4.99Automate WordPress Backup to GitHub
This workflow automates the process of backing up WordPress content to GitHub, ensuring your data is securely stored and version-controlled.
n8n$14.99Automate Critical Error Alerts with Slack and Jira Integration
This workflow automates the detection and handling of critical errors in production environments by sending real-time alerts to Slack and creating Jira tickets for immediate resolution.
n8n$4.99Automate n8n Workflow Backup with Versioning and Notion Tracking
This workflow automates the backup of n8n workflows with versioning and tracks details in Notion. It ensures multiple versions are maintained on the destination instance, with each workflow prefixed by the date for easy tracking.
n8n$14.99
Related categories
Custom AI Systems & Services
Our team of experienced AI builders will help build custom AI systems, workflows, and solutions.
Request Custom Work