Convert GIF to MP4 using FFmpegAPI - n8n Workflow

Easily convert GIFs to MP4 format automatically using this powerful n8n workflow. Learn how to set up the n8n node sequence for media file transformation with FFmpegAPI.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Users needing automated media file conversion capabilities.
Developers looking for practical examples of complex API interactions within an n8n workflow.
n8n users wanting to deploy public file conversion tools.
Anyone searching for efficient n8n templates for video processing.

Overview

Converting media files like GIFs to MP4 often requires dedicated, complex backend infrastructure or local tooling. This solution utilizes a streamlined n8n workflow paired with the powerful FFmpegAPI to handle the heavy lifting entirely in the cloud. This specific n8n workflow demonstrates how to manage multi-step API processes—including securing an upload URL, uploading binary data, initiating processing, and retrieving the final asset—all within a single, cohesive automation flow. This is a highly valuable n8n template for anyone dealing with media transformations, providing an efficient and scalable automation solution using custom n8n node configurations.

How it Works

This n8n workflow begins with the 'Attach file' n8n trigger node, which presents a web form for the user to upload a GIF.


  1. Preparation: The n8n workflow immediately requests an upload path from the FFmpegAPI using the 'Get Upload URL' n8n node, passing the file's original name and authenticating via a stored FFMPEGAPIKEY.

  2. Data Combining: The 'Merge' n8n node combines the input binary data (the GIF) from the n8n trigger with the upload instructions received from the API endpoint.

  3. Upload: The 'Upload File' n8n node uses the dynamically retrieved URL and method to send the binary GIF data to the FFmpegAPI's temporary storage.

  4. Processing: Once uploaded, the 'Process File' n8n node initiates the conversion task, instructing the API to transform the GIF path into an output.mp4 file.

  5. Completion: Finally, the 'Download URL' n8n node (a Form node operating in completion mode) takes the resulting download URL from the processed item and displays it back to the user via the browser, concluding the n8n workflow execution.

Installation Guide

To use this n8n template successfully, follow these steps:


  1. Import: Copy the provided JSON data and paste it into your n8n instance using the "Import from JSON" feature to install this n8n workflow.

  2. FFmpegAPI Key Setup:

Create an account on FFmpegAPI and obtain your API Key.
In your n8n instance, navigate to Variables.
* Create a new variable named FFMPEGAPIKEY and paste your secret key here. This variable is crucial for the n8n node authentication in the HTTP requests.

  1. Activate: Ensure the n8n workflow is active and click the "Execute workflow" button to test the Attach file n8n trigger.

  2. Execution: Use the generated web link to access the file upload form and start your GIF to MP4 conversion process.

Node Details

This n8n workflow utilizes several key nodes to manage the file conversion process:

Attach file (Form Trigger n8n trigger):
Function: Acts as the starting point and public interface for the n8n workflow, allowing users to upload a single GIF file (.gif accepted type).
Key Configuration: Set to respond with the output of the last node (Download URL).
Get Upload URL (HTTP Request n8n node):
Function: Secures a temporary file path and upload method from FFmpegAPI for the incoming GIF.
Key Configuration: URL https://api.ffmpeg-api.com/file. Uses Authorization: Basic {{ $vars.FFMPEGAPIKEY }} for secure authentication.
Merge (Core Logic n8n node):
Function: Combines the output from the Attach file (the GIF binary data) and Get Upload URL (the necessary upload metadata) so the subsequent 'Upload File' n8n node has both the target URL and the source file.
Upload File (HTTP Request n8n node):
Function: Executes the actual file transfer using the credentials and URL received in previous steps. It sends the input binary data field.
Key Configuration: contentType: binaryData. URL and Method are dynamically derived from the 'Get Upload URL' n8n node output.
Process File (HTTP Request n8n node):
Function: Initiates the conversion job within the FFmpegAPI system, transforming the uploaded file into an MP4 format. This is the core logic of the n8n workflow.
Key Configuration: URL https://api.ffmpeg-api.com/ffmpeg/process. The JSON body specifies the input file path and defines one output file named output.mp4.
Download URL (Form n8n node):
Function: Presents the final converted file link to the user, acting as the completion step of this n8n workflow.
* Key Configuration: Uses the dynamic expression to generate a clickable link using data from the 'Process File' n8n node response.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by
Matt Delaney
Matt Delaney

Featured*