バイナリMIMEタイプ-拡張子変更
中級
これはAI分野の自動化ワークフローで、6個のノードを含みます。主にSet, Code, ExtractFromFile, ExecuteWorkflowTriggerなどのノードを使用、AI技術を活用したスマート自動化を実現。 バイナリMIMEタイプ/拡張子の変更
前提条件
- •AIサービスAPIキー(OpenAI、Anthropicなど)
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "e409ea34548a2afe2dffba31130cd1cf2e98ebe2afaeed2a63caf2a0582d1da0"
},
"nodes": [
{
"id": "491b237e-9d42-4017-bc80-9301367e4469",
"name": "ファイルから抽出",
"type": "n8n-nodes-base.extractFromFile",
"position": [
220,
-80
],
"parameters": {
"options": {},
"operation": "binaryToPropery",
"binaryPropertyName": "={{ Object.keys($binary).first() }}"
},
"typeVersion": 1
},
{
"id": "2a7ea7bd-b009-4219-a5da-5d62976185a5",
"name": "出力ファイル名を設定",
"type": "n8n-nodes-base.set",
"position": [
-160,
-80
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "db6b30b5-a420-430b-87ae-a4887bfe9628",
"name": "binary_key",
"type": "string",
"value": "={{ Object.keys($binary).first() }}"
},
{
"id": "8e1643f7-e794-43b2-a5ac-80b6b621b547",
"name": "output_file_name",
"type": "string",
"value": "SET YOUR OUTPUT FILE NAME AND EXTENSION !! (ex: .mp3 or .png)"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "b9e1072b-c9c2-4d5b-a13a-4eed7a920203",
"name": "バイナリデータタイプ変更",
"type": "n8n-nodes-base.code",
"position": [
440,
-80
],
"parameters": {
"jsCode": "const myBuffer = Buffer.from($json.data, 'base64');\n\n$input.item.binary = {\n [$('SET OUTPUT FILE NAME').last().json.binary_key]: await this.helpers.prepareBinaryData(myBuffer, $('SET OUTPUT FILE NAME').last().json.output_file_name)\n};\n\nreturn $input.item;\n"
},
"typeVersion": 2
},
{
"id": "e5fc3b22-3f86-4cef-b0c7-d2f8b7261784",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
-420
],
"parameters": {
"color": 3,
"width": 420,
"height": 500,
"content": "### ⚙️ CONFIGURE HERE ⚙️\n\nThis is the main node you need to edit.\n\n1. **`output_file_name`**: Change this value to the desired file name and extension. The extension is what determines the new MIME type.\n * **Example:** To convert to an MP3, set the value to `audio.mp3`.\n * **Example:** To ensure a file is treated as a PNG, set it to `image.png`.\n\n2. **`binary_key`**: This field is dynamic and automatically finds the name of the incoming binary property. **Do not change this.**"
},
"typeVersion": 1
},
{
"id": "41ac8c2b-6530-46bc-9153-8b3c312076f9",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
-340
],
"parameters": {
"color": 7,
"width": 480,
"height": 420,
"content": "### ⚙️ Core Logic (No Edit Needed)\n\nThese nodes work together to perform the conversion:\n\n1. **Extract from File:** Converts the binary into text (Base64).\n2. **Code:** Rebuilds the binary file using the new file name you provided in the previous step.\n\nThis process effectively changes the file's perceived format for other n8n nodes or external services."
},
"typeVersion": 1
},
{
"id": "d7de41a8-eb35-4b84-862f-9a2deb438d93",
"name": "バイナリMIMEタイプ/拡張子変更",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-520,
-80
],
"parameters": {
"inputSource": "passthrough"
},
"typeVersion": 1.1
}
],
"pinData": {},
"connections": {
"491b237e-9d42-4017-bc80-9301367e4469": {
"main": [
[
{
"node": "b9e1072b-c9c2-4d5b-a13a-4eed7a920203",
"type": "main",
"index": 0
}
]
]
},
"2a7ea7bd-b009-4219-a5da-5d62976185a5": {
"main": [
[
{
"node": "491b237e-9d42-4017-bc80-9301367e4469",
"type": "main",
"index": 0
}
]
]
},
"d7de41a8-eb35-4b84-862f-9a2deb438d93": {
"main": [
[
{
"node": "2a7ea7bd-b009-4219-a5da-5d62976185a5",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - 人工知能
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
AIを活用したNextcloudドキュメントチャットシステム、LangChainとOpenAIを使用
AIを活用したNextcloudドキュメントチャットシステム、LangChainとOpenAIを使用
If
Set
Code
+
If
Set
Code
21 ノードjohappel
人工知能
ComfyUI を使用して AI メディアの生成:画像、動画、3D、オーディオ橋渡し
ComfyUI を使って AI メディアを生成する:画像、動画、3D、オーディオ連携
If
Set
Code
+
If
Set
Code
51 ノードNielo
デザイン
並列処理で速度を最適化した重要なワークフロー(ファンアウト-ファンイン)
並列処理(ファンアウト/ファンイン)を活用した速度クリティカルなワークフローを最適化
If
Set
Code
+
If
Set
Code
34 ノードLucas Peyrin
エンジニアリング
待機ノード付きの長時間実行ワークフロー状態管理システム
待機ノード付きの長時間実行ワークフロー状態管理システム
If
Set
Code
+
If
Set
Code
42 ノードLucas Peyrin
エンジニアリング
自動n8nアップデータ(Docker)
自動n8nアップデーター(Docker)
If
Set
Ssh
+
If
Set
Ssh
26 ノードLucas Peyrin
人工知能
リジライトなAIワーキングフローを自動GPTとGeminiフォールバックチェーンで構築
自動GPTとGeminiフォールバックチェーンを使用して弾力のなAIワーキングフローを構築する
Set
Manual Trigger
Code
+
Set
Manual Trigger
Code
9 ノードLucas Peyrin
人工知能
ワークフロー情報
難易度
中級
ノード数6
カテゴリー1
ノードタイプ5
作成者
Lucas Peyrin
@lucaspeyrinInnovative builder with a passion for crafting automation solutions that solve real-world challenges. From streamlining workflows to driving efficiency, my work empowers teams and individuals to achieve more with less effort. Experienced in developing scalable tools and strategies that deliver results with n8n, supabase and cline.
外部リンク
n8n.ioで表示 →
このワークフローを共有