✅ Construa um Chatbot de Whatsapp grátis com N8N e a API WPPConnect
📁 Arquivos prontos para download nessa aula.
👉 INSTRUÇÕES BÁSICAS:
WPP CONNECT + ESCUTANDO MENSAGENS NO N8N
1- DOWNLOAD GIT, NODE E N8
2- INSTALAR WPP E N8N
a. git clone https://github.com/wppconnect-team/wppconnect.git
b. npm install
c. npm run build
d. npm install request
3- INJETAR CÓDIGO N8N
4- CRIAR FLOW
DIST > UTIL > createSessionUtil.js
const request = require('request');
var options = {
'method': 'POST',
'url': 'https://n8n.comunidadezdg.com.br/webhook-test/69731a13-ddc0-4ae5-8fb5-9fe8ccd48de6',
'headers': {
'Content-Type': 'application/json'
},
json: message
};
request(options, function (error, response) {
if (error) {
throw new Error(error);
}
else {
console.log(response.body);
}
});