Files
INDENTIFICAR-TEXTO-EM-IMAGEM/n8n/orcamento-exames-imagem.workflow.json
T

160 lines
3.7 KiB
JSON

{
"id": "6FU0jjPwEKDBrFSW",
"name": "Orçamento de Exames - GChat - Z-PRO (IA Visão)",
"active": false,
"nodes": [
{
"id": "webhook-orcamento",
"name": "Webhook - Foto Exame",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
-600,
0
],
"parameters": {
"httpMethod": "POST",
"path": "orcamento-exames-zpro",
"responseMode": "onReceived",
"options": {}
},
"webhookId": "5ea5f89e-7351-4d45-a881-0055009423a0"
},
{
"id": "extrair-campos",
"name": "Extrair campos do webhook",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-360,
0
],
"parameters": {
"assignments": {
"assignments": [
{
"id": "campo-sessionid",
"name": "sessionId",
"type": "string",
"value": "={{ $json.body.protocol }}"
},
{
"id": "campo-telefone",
"name": "telefone",
"type": "string",
"value": "={{ $json.body.number }}"
},
{
"id": "campo-nomecontato",
"name": "nomeContato",
"type": "string",
"value": "={{ $json.body.contactName }}"
},
{
"id": "campo-imagemurl",
"name": "imagemUrl",
"type": "string",
"value": "={{ $json.body.mediaUrl || $json.body.fileUrl || $json.body.file || '' }}"
},
{
"id": "campo-tipomidia",
"name": "tipoMidia",
"type": "string",
"value": "={{ $json.body.mediaType || $json.body.type || '' }}"
}
]
},
"options": {}
}
},
{
"id": "if-e-imagem",
"name": "É mensagem de imagem?",
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
-120,
0
],
"parameters": {
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cond-tem-imagem",
"leftValue": "={{ $json.imagemUrl }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
}
}
]
},
"options": {}
}
},
{
"id": "noop-nao-imagem",
"name": "Não é imagem - encerra",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
120,
160
],
"parameters": {}
}
],
"connections": {
"Webhook - Foto Exame": {
"main": [
[
{
"node": "Extrair campos do webhook",
"type": "main",
"index": 0
}
]
]
},
"Extrair campos do webhook": {
"main": [
[
{
"node": "É mensagem de imagem?",
"type": "main",
"index": 0
}
]
]
},
"É mensagem de imagem?": {
"main": [
[],
[
{
"node": "Não é imagem - encerra",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"saveDataErrorExecution": "all",
"saveDataSuccessExecution": "all",
"saveManualExecutions": true,
"saveExecutionProgress": true
}
}