N
n8n Store
Workflow Market
Transcriber Bot 0.0.1

Transcriber Bot 0.0.1

by alma-jr0 views

描述

分类

🤖 AI & Machine Learning

使用的节点

n8n-nodes-base.setn8n-nodes-base.switchn8n-nodes-base.webhookn8n-nodes-base.httpRequestn8n-nodes-base.convertToFilen8n-nodes-evolution-api.evolutionApi
价格免费
浏览量0
最后更新11/28/2025
workflow.json
{
  "id": "OzNqz9EZH75jPYRW",
  "meta": {
    "instanceId": "a26accefee85c02f9545df2286a47b35715b55f8295fb43f6205a90c55027cb7"
  },
  "name": "Transcriber Bot 0.0.1",
  "tags": [],
  "nodes": [
    {
      "id": "1b8771ac-adc3-49a6-af4a-dec3de69ba9d",
      "name": "Webhook1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -780,
        -240
      ],
      "webhookId": "a6ce1c05-f39a-42df-aa35-7a5beabf182a",
      "parameters": {
        "path": "seucaminho/MESSAGES_UPSERT",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "8c8ee493-15bb-4d96-840c-7441cbe2c795",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        -560,
        -240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "name": "numero",
              "type": "string",
              "value": "={{ $json.body.data.key.remoteJid.split(\"@\").first() }}"
            },
            {
              "name": "nome",
              "type": "string",
              "value": "={{ $json.body.data.pushName }}"
            },
            {
              "name": "mensagem",
              "type": "string",
              "value": "={{ $json.body.data.message.conversation }}"
            },
            {
              "name": "tipo_msg",
              "type": "string",
              "value": "={{ $json.body.data.messageType }}"
            },
            {
              "name": "audio",
              "type": "string",
              "value": "={{ $json.body.data.message.base64 }}"
            },
            {
              "name": "body.data.key.fromMe",
              "type": "boolean",
              "value": "={{ $json.body.data.key.fromMe }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "29f7ed16-aab2-44b3-9e2c-ad02e467e1f5",
      "name": "Switch1",
      "type": "n8n-nodes-base.switch",
      "position": [
        -340,
        -240
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.tipo_msg }}",
                    "rightValue": "audioMessage"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "b0a39ac9-77d4-4ed1-b087-8dd8e8a43474",
      "name": "Convert to File1",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -120,
        -240
      ],
      "parameters": {
        "options": {
          "fileName": "audio.mp3",
          "mimeType": "audio/mpeg"
        },
        "operation": "toBinary",
        "sourceProperty": "audio"
      },
      "typeVersion": 1.1
    },
    {
      "id": "6df6c4d1-936a-436b-9196-4bb37f4c3c33",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        100,
        -240
      ],
      "parameters": {
        "url": "https://api.groq.com/openai/v1/audio/transcriptions",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            },
            {
              "name": "model",
              "value": "whisper-large-v3"
            },
            {
              "name": "response_format",
              "value": "json"
            },
            {
              "name": "temperature",
              "value": "0"
            },
            {
              "name": "language",
              "value": "pt"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.GROQ_API_KEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "af110489-ec08-4c1a-b83f-8cc6dec9d3f4",
      "name": "Evolution API",
      "type": "n8n-nodes-evolution-api.evolutionApi",
      "position": [
        320,
        -240
      ],
      "parameters": {
        "resource": "messages-api",
        "remoteJid": "={{ $('Webhook1').item.json.body.data.key.remoteJid }}",
        "messageText": "=*Mensagem transcrita automaticamente.*/n{{ $('HTTP Request1').item.json.text }}",
        "instanceName": "={{ $('Webhook1').item.json.body.instance }}",
        "options_message": {
          "quoted": {
            "messageQuoted": {
              "messageId": "={{ $('Webhook1').item.json.body.data.key.id }}"
            }
          }
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3cb67cf9-e9b6-42fb-83f7-830aef49279e",
  "connections": {
    "Switch1": {
      "main": [
        [
          {
            "node": "Convert to File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook1": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Evolution API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File1": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

相关工作流