CI/CD Pipelines Templates
6 workflow templates for ci/cd pipelines automation
N8n Workflow Backup to Github
This workflow automates the backup of n8n workflows to a GitHub repository. It can be triggered manually or daily at 20:00. It fetches a list of workflows from an n8n instance, processes them one at a time, compares them with existing files in GitHub, and updates or creates new JSON files based on their status (same, different, or new).
Send Tweets Every Minute to Mattermost - N8n Template
This workflow executes every minute and fetches the recent tweets from Twitter with the search query `n8n_io`. The workflow is built on the concept of polling.  **Cron node:** The Cron node triggers the workflow every minute. Based on your use-case you can configure the time. You can even use the Interval node to trigger the workflow at a certain time interval. **Twitter node:** The Twitter node searches for the tweets that contain `n8n_io` and returns the most recent tweets. You can specify a different search query based on your use-case. **Set node:** The Set node sets the data that we pass on to the next nodes in the workflow. You can set only the values that you require in your workflow. **Function node:** All the magic happens in this node. The Twitter node returns all the recent tweets, including the ones which were returned earlier. The Function node, using the `getWorkflowStaticData()` method, only returns the tweets that are new, i.e., the tweets that were not returned in the previous workflow. **Mattermost node:** The Mattermost node sends the tweets from the Function node to the Twitter notifications channel. If you don't use Mattermost and want to share this data on a different platform, replace this node with the appropriate node.
Trigger a Build in Travis Ci When Code Changes Are Push T...
This workflow allows you to trigger a build in Travis CI when code changes are pushed to a GitHub repo or a pull request gets opened.  **GitHub Trigger node:** This node will trigger the workflow when changes are pushed or when a pull request is created, updated, or deleted. **IF node:** This node checks for the action type. We want to trigger a build when code changes are pushed or when a pull request is opened. We don't want to build the project when a PR is closed or updated. **TravisCI node:** This node will trigger the build in Travis CI. If you're using CircleCI in your pipeline, replace the node with the CircleCI node. **NoOp node:** Adding this node is optional.
Generate Terraform Code from Natural Language with Gpt-4
<h1>Description</h1> <h3> Automatically generate Terraform Infrastructure as Code (IaC) using natural language prompts and OpenAI GPT-4. </h3> <p> This workflow enables users to send plain English requests like “Create an EC2 instance in AWS” and receive valid Terraform configuration code in return. </p> <p> Ideal for DevOps engineers, cloud architects, and developers looking to quickly prototype IaC or integrate AI-driven Terraform code generation into their CI/CD pipelines. </p> <h2>How It Works</h2> <ol> <li><strong>Receives a user prompt</strong> via webhook.</li> <li><strong>Sends the prompt</strong> to OpenAI's GPT-4 API.</li> <li><strong>Receives AI-generated Terraform code</strong> as output.</li> <li><strong>Returns the Terraform code</strong> in the webhook response.</li> <li><em>(Optional)</em> <strong>Saves the code</strong> to a <code>.tf</code> file or <strong>integrates with other services</strong> (e.g., GitHub, email, CI/CD).</li> </ol> <h2>Setup Instructions</h2> <h3>Prerequisites</h3> <ul> <li><a href="https://platform.openai.com/account/api-keys">OpenAI API Key</a></li> <li>A running instance of n8n (self-hosted or <a href="https://n8n.io">n8n.cloud</a>)</li> <li>Basic understanding of webhooks</li> </ul> <h3>Step-by-Step Guide</h3> <h4>1. Configure OpenAI Credentials</h4> <p>In n8n, go to <strong>Credentials → OpenAI API</strong> and add your API key.</p> <h4>2. Import the Workflow</h4> <p>Use the provided JSON to import the workflow into your n8n instance.</p> <h4>3. Activate the Webhook</h4> <p>Deploy the workflow. Copy the webhook URL generated by the <strong>Webhook Trigger</strong> node.</p> <h4>4. Test the Workflow</h4> <p>Send a <code>POST</code> request to the webhook using the following format:</p> <pre><code>{ "prompt": "Create an EC2 instance in AWS" } </code></pre>
Automated Image Optimizer Convert Jpg Png to Webp with a...
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: 1. **Faster Loading Speed** – WebP files are smaller than JPG and PNG, reducing page load times and improving user experience. 2. **Better Core Web Vitals** – Google prioritizes websites with good performance metrics like LCP (Largest Contentful Paint). 3. **Improved Mobile Performance** – Smaller images consume less bandwidth, enhancing mobile usability. 4. **Higher Search Rankings** – Faster sites tend to rank better on Google due to improved user experience. 5. **Reduced Server Load** – Lighter images lower hosting and CDN costs while improving site efficiency. Below is a breakdown of the workflow: ---
Uploading a File to a Slack Channel - N8n Template
This workflow shows you how to post a message to a Slack channel and add a file attachment. It also shows you the general pattern for working with Binary data in n8n (any file like a PDF, Image etc). Specifically, this workflow shows how to download a file from a URL into your workflow, and then upload it to Slack. **Video walkthrough** Watch this 3 min Loom video for a walkthrough and more context on this general pattern: [](https://www.loom.com/share/e8db4c4888f64ff584373cde5e82e2e4)