n8n-nodes-evolution-api
Advanced tools
Comparing version 0.1.40 to 0.1.41
@@ -232,2 +232,29 @@ "use strict"; | ||
} | ||
if (resource === 'messages-api' && operation === 'sendDocumento') { | ||
const credentials = await this.getCredentials('httpbinApi'); | ||
const serverUrl = credentials['server-url']; | ||
const apiKey = credentials.apikey; | ||
const instanceName = this.getNodeParameter('instanceName', 0); | ||
const remoteJid = this.getNodeParameter('remoteJid', 0); | ||
const media = this.getNodeParameter('media', 0); | ||
const mimetype = this.getNodeParameter('mimetype', 0); | ||
const caption = this.getNodeParameter('caption', 0); | ||
const options = { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
apikey: apiKey, | ||
}, | ||
uri: `${serverUrl}/message/sendMedia/${instanceName}`, | ||
body: { | ||
number: remoteJid, | ||
'mediatype': 'document', | ||
media: media, | ||
mimetype: mimetype, | ||
caption: caption, | ||
}, | ||
json: true, | ||
}; | ||
responseData = await this.helpers.request(options); | ||
} | ||
return [this.helpers.returnJsonArray(responseData)]; | ||
@@ -234,0 +261,0 @@ } |
@@ -192,2 +192,3 @@ "use strict"; | ||
number: '={{$node["Número"].number}}', | ||
mediatype: 'document', | ||
midia: '={{$node["Documento"].midia}}', | ||
@@ -684,2 +685,81 @@ text: '={{$node["Mensagem"].text}}', | ||
}, | ||
{ | ||
displayName: 'Nome Da Instância', | ||
name: 'instanceName', | ||
type: 'string', | ||
default: '', | ||
description: 'Digite o nome da instância que vai enviar o documento', | ||
displayOptions: { | ||
show: { | ||
resource: ['messages-api'], | ||
operation: ['sendDocumento'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Número Do Destinatário', | ||
name: 'remoteJid', | ||
type: 'string', | ||
default: '', | ||
required: true, | ||
displayOptions: { | ||
show: { | ||
resource: ['messages-api'], | ||
operation: ['sendDocumento'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Documento', | ||
name: 'midia', | ||
type: 'string', | ||
default: '', | ||
required: true, | ||
description: 'URL ou base64 do documento', | ||
displayOptions: { | ||
show: { | ||
resource: ['messages-api'], | ||
operation: ['sendDocumento'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Mensagem', | ||
name: 'text', | ||
type: 'string', | ||
default: '', | ||
description: 'Texto a ser enviado junto ao documento', | ||
displayOptions: { | ||
show: { | ||
resource: ['messages-api'], | ||
operation: ['sendDocumento'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Mimetype', | ||
name: 'mimetype', | ||
type: 'string', | ||
default: 'document/pdf', | ||
description: 'Tipo MIME do vídeo', | ||
displayOptions: { | ||
show: { | ||
resource: ['messages-api'], | ||
operation: ['sendDocumento'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Nome Do Arquivo', | ||
name: 'fileName', | ||
type: 'string', | ||
default: 'Arquivo.pdf', | ||
description: 'Nome do arquivo do vídeo', | ||
displayOptions: { | ||
show: { | ||
resource: ['messages-api'], | ||
operation: ['sendDocumento'], | ||
}, | ||
}, | ||
}, | ||
]; | ||
@@ -686,0 +766,0 @@ const deleteOperation = [ |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.40", | ||
"version": "0.1.41", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.40", | ||
"version": "0.1.41", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -18,5 +18,5 @@ **[ Features do Node ]** | ||
✅ Enviar mensagem de audio;<br> (by Orion) | ||
❌ Enviar mensagem de documentos;<br> (by Orion) | ||
✅ Enviar mensagem de documentos;<br> (by Orion) | ||
❌ Enviar mensagem de status;<br> | ||
❌ Enviar mensagem de enquete;<br> | ||
❌ Enviar mensagem de lista;<br> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92423
1204