Skip to main content

๐Ÿ› ๏ธ Change Binary MimeType/Extension

Workflow preview

Workflow preview
100%
๐Ÿ› ๏ธ Change Binary MimeType/Extension preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This workflow changes the file name, and therefore the extension and MIME type, of any binary file passed to it. This is perfect for converting file formats on the fly, like turning a ...

Best for

  • File Management automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.extractfromfile, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.stickynote, n8n-nodes-base.executeworkflowtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lucas Peyrin.

Original n8n.io source

1.1 Workflow description

Title
๐Ÿ› ๏ธ Change Binary MimeType/Extension
Workflow name
๐Ÿ› ๏ธ Change Binary MimeType/Extension

How it works

This workflow changes the file name, and therefore the extension and MIME type, of any binary file passed to it. This is perfect for converting file formats on the fly, like turning a Telegram voice message (.oga) into an MP3 for an AI transcription service.

  1. Set New File Name: The SET OUTPUT FILE NAME node is where you define the desired output file name and extension (e.g., audio.mp3). It also dynamically captures the property name of the incoming binary (e.g., data).
  2. Extract Binary Data: The workflow temporarily converts the binary file into a Base64 text string to make it accessible in the next step.
  3. Rebuild Binary with New Name: A Code node takes the Base64 data and reconstructs it as a binary file, but this time, it assigns the new file name you specified. n8n automatically sets the MIME type based on the new file extension.

Set up steps

Setup time: < 1 minute

This workflow is designed to be used as a sub-workflow.

  1. In your main workflow, add an Execute Sub-Workflow node where you need to change a file's type.
  2. In the Workflow parameter, select this "Change Binary MimeType/Extension" workflow.
  3. Open this workflow and go to the SET OUTPUT FILE NAME node.
  4. Modify the output_file_name value to your desired file name (e.g., voice_message.mp3 or document.pdf).
  5. Save this workflow. Now, any binary file you send to it from your main workflow will be returned with the new fileName and mimeType.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 2 - SET OUTPUT FILE NAME

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Change Binary Data Type

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Change Binary MimeType/Extension

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 7 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow ๐Ÿ› ๏ธ Change Binary MimeType/Extension
Complexity intermediate
Nodes 8
Categories File Management
Author Lucas Peyrin
Published 23 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5155/5155.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does ๐Ÿ› ๏ธ Change Binary MimeType/Extension do?

How it works This workflow changes the file name, and therefore the extension and MIME type, of any binary file passed to it. This is perfect for converting file formats on the fly, like turning a ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your File Management use case.