-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
74 changed files
with
3,703 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
FROM node:16.18-alpine | ||
|
||
LABEL version="1.1.3" description="Api to control whatsapp features through http requests." | ||
LABEL version="1.5.0" description="Api to control whatsapp features through http requests." | ||
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes" | ||
LABEL contact="[email protected]" | ||
|
||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache git | ||
apk add --no-cache git tzdata ffmpeg wget curl | ||
|
||
WORKDIR /evolution | ||
|
||
COPY ./package.json . | ||
|
||
ENV TZ=America/Sao_Paulo | ||
ENV DOCKER_ENV=true | ||
|
||
ENV SERVER_URL=http://localhost:8080 | ||
|
@@ -50,7 +51,12 @@ ENV REDIS_ENABLED=false | |
ENV REDIS_URI=redis://redis:6379 | ||
ENV REDIS_PREFIX_KEY=evolution | ||
|
||
ENV WEBHOOK_GLOBAL_URL=<url> | ||
ENV RABBITMQ_ENABLED=false | ||
ENV RABBITMQ_URI=amqp://guest:guest@rabbitmq:5672 | ||
|
||
ENV WEBSOCKET_ENABLED=false | ||
|
||
ENV WEBHOOK_GLOBAL_URL= | ||
ENV WEBHOOK_GLOBAL_ENABLED=false | ||
|
||
ENV WEBHOOK_GLOBAL_WEBHOOK_BY_EVENTS=false | ||
|
@@ -82,6 +88,7 @@ ENV CONFIG_SESSION_PHONE_CLIENT=EvolutionAPI | |
ENV CONFIG_SESSION_PHONE_NAME=chrome | ||
|
||
ENV QRCODE_LIMIT=30 | ||
ENV QRCODE_COLOR=#198754 | ||
|
||
ENV AUTHENTICATION_TYPE=apikey | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
{ | ||
"name": "[Evolution] Configurar Admin", | ||
"nodes": [ | ||
{ | ||
"parameters": { | ||
"values": { | ||
"string": [ | ||
{ | ||
"name": "api_access_token", | ||
"value": "CHATWOOT_ADMIN_USER_TOKEN" | ||
}, | ||
{ | ||
"name": "chatwoot_url", | ||
"value": "https://CHATWOOT_URL" | ||
}, | ||
{ | ||
"name": "n8n_url", | ||
"value": "https://N8N_URL" | ||
}, | ||
{ | ||
"name": "organization", | ||
"value": "ORGANIZATION_NAME" | ||
}, | ||
{ | ||
"name": "logo", | ||
"value": "ORGANIZATION_LOGO" | ||
} | ||
] | ||
}, | ||
"options": {} | ||
}, | ||
"id": "7a89a538-2cae-4032-8896-09627c07bc68", | ||
"name": "Info Base", | ||
"type": "n8n-nodes-base.set", | ||
"typeVersion": 2, | ||
"position": [ | ||
620, | ||
480 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"method": "POST", | ||
"url": "={{ $('Info Base').item.json[\"chatwoot_url\"] }}/api/v1/accounts/1/contacts/", | ||
"sendHeaders": true, | ||
"headerParameters": { | ||
"parameters": [ | ||
{ | ||
"name": "api_access_token", | ||
"value": "={{ $('Info Base').item.json[\"api_access_token\"] }}" | ||
} | ||
] | ||
}, | ||
"sendBody": true, | ||
"specifyBody": "json", | ||
"jsonBody": "={\n \"inbox_id\": {{ $('Cria Inbox Start').item.json[\"id\"] }},\n \"name\": \"Bot {{ $('Info Base').item.json[\"organization\"] }}\",\n \"phone_number\": \"+123456\",\n \"avatar_url\": \"{{ $('Info Base').item.json[\"logo\"] }}\"\n}", | ||
"options": {} | ||
}, | ||
"id": "12a39df3-6b95-4f83-a0bc-50b25adaca7f", | ||
"name": "Cria Contato Bot", | ||
"type": "n8n-nodes-base.httpRequest", | ||
"typeVersion": 3, | ||
"position": [ | ||
1020, | ||
480 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"method": "POST", | ||
"url": "={{ $('Info Base').item.json[\"chatwoot_url\"] }}/api/v1/accounts/1/inboxes/", | ||
"sendHeaders": true, | ||
"headerParameters": { | ||
"parameters": [ | ||
{ | ||
"name": "api_access_token", | ||
"value": "={{ $('Info Base').item.json[\"api_access_token\"] }}" | ||
} | ||
] | ||
}, | ||
"sendBody": true, | ||
"specifyBody": "json", | ||
"jsonBody": "={\n \"name\": \"Start {{ $('Info Base').item.json[\"organization\"] }}\",\n \"channel\": {\n \"type\": \"api\",\n \"website_url\": \"\"\n }\n}", | ||
"options": {} | ||
}, | ||
"id": "bed7c54d-e232-4fe4-9584-0515e9679868", | ||
"name": "Cria Inbox Start", | ||
"type": "n8n-nodes-base.httpRequest", | ||
"typeVersion": 3, | ||
"position": [ | ||
820, | ||
480 | ||
] | ||
}, | ||
{ | ||
"parameters": {}, | ||
"id": "36ada769-a757-4193-989b-0cc4ea504b80", | ||
"name": "When clicking \"Execute Workflow\"", | ||
"type": "n8n-nodes-base.manualTrigger", | ||
"typeVersion": 1, | ||
"position": [ | ||
420, | ||
480 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"method": "POST", | ||
"url": "={{ $('Info Base').item.json[\"chatwoot_url\"] }}/api/v1/accounts/1/automation_rules/", | ||
"sendHeaders": true, | ||
"headerParameters": { | ||
"parameters": [ | ||
{ | ||
"name": "api_access_token", | ||
"value": "={{ $('Info Base').item.json[\"api_access_token\"] }}" | ||
} | ||
] | ||
}, | ||
"sendBody": true, | ||
"specifyBody": "json", | ||
"jsonBody": "={\n \"name\": \"Create Company Chatwoot\",\n \"description\": \"Create Company Chatwoot\",\n \"event_name\": \"message_created\",\n \"active\": true,\n \"actions\": \n [\n {\n \"action_name\": \"send_webhook_event\",\n \"action_params\": [\"{{ $('Info Base').item.json[\"n8n_url\"] }}/webhook/criadorchatwoot\"]\n }\n ],\n \"conditions\": \n [\n {\n \"attribute_key\": \"content\",\n \"filter_operator\": \"contains\",\n \"query_operator\": \"and\",\n \"values\": [\"Tema Criador de Empresa:\"]\n },\n {\n \"attribute_key\": \"phone_number\",\n \"filter_operator\": \"equal_to\",\n \"values\": [\"+123456\"]\n }\n ]\n}", | ||
"options": {} | ||
}, | ||
"id": "f5bbb285-71a8-4c58-a4d7-e56002d697f0", | ||
"name": "Cria Automação Empresas", | ||
"type": "n8n-nodes-base.httpRequest", | ||
"typeVersion": 3, | ||
"position": [ | ||
1220, | ||
480 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"method": "POST", | ||
"url": "={{ $('Info Base').item.json[\"chatwoot_url\"] }}/api/v1/accounts/1/automation_rules/", | ||
"sendHeaders": true, | ||
"headerParameters": { | ||
"parameters": [ | ||
{ | ||
"name": "api_access_token", | ||
"value": "={{ $('Info Base').item.json[\"api_access_token\"] }}" | ||
} | ||
] | ||
}, | ||
"sendBody": true, | ||
"specifyBody": "json", | ||
"jsonBody": "={\n \"name\": \"Create Inbox {{ $('Info Base').item.json[\"organization\"] }}\",\n \"description\": \"Create Inbox {{ $('Info Base').item.json[\"organization\"] }}\",\n \"event_name\": \"message_created\",\n \"active\": true,\n \"actions\": \n [\n {\n \"action_name\": \"send_webhook_event\",\n \"action_params\": [\"{{ $('Info Base').item.json[\"n8n_url\"] }}/webhook/inbox_whatsapp?utoken={{ $('Info Base').item.json[\"api_access_token\"] }}&organization={{ $('Info Base').item.json[\"organization\"] }}\"]\n }\n ],\n \"conditions\": \n [\n {\n \"attribute_key\": \"content\",\n \"filter_operator\": \"contains\",\n \"query_operator\": \"and\",\n \"values\": [\"start:\"]\n },\n \n {\n \"attribute_key\": \"phone_number\",\n \"filter_operator\": \"equal_to\",\n \"query_operator\": \"or\",\n \"values\": [\"+123456\"]\n },\n\n\n {\n \"attribute_key\": \"content\",\n \"filter_operator\": \"contains\",\n \"query_operator\": \"and\",\n \"values\": [\"new_instance:\"]\n },\n {\n \"attribute_key\": \"phone_number\",\n \"filter_operator\": \"equal_to\",\n \"values\": [\"+123456\"]\n }\n ]\n}", | ||
"options": {} | ||
}, | ||
"id": "a36bebdc-a318-40a2-8532-c7f476f8adb7", | ||
"name": "Cria Automação Inboxes", | ||
"type": "n8n-nodes-base.httpRequest", | ||
"typeVersion": 3, | ||
"position": [ | ||
1420, | ||
480 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"content": "## Workflow Para Configurar admin\n**Aqui você prepara o Chatwoot Principal com um usuário (Superadmin) que poderá criar empresas e caixas de entrada**\n**Instruções**\n**No node Info Base, configure as variáveis de seu Chatwoot e N8N**\n**Obs: A variável api_access_token é o token do usuário que irá poder criar as empresas**", | ||
"width": 894.6435495898575 | ||
}, | ||
"id": "db66e867-e9f4-452d-b521-725eeac652c8", | ||
"name": "Sticky Note", | ||
"type": "n8n-nodes-base.stickyNote", | ||
"typeVersion": 1, | ||
"position": [ | ||
420, | ||
280 | ||
] | ||
} | ||
], | ||
"pinData": {}, | ||
"connections": { | ||
"Info Base": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Cria Inbox Start", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
}, | ||
"Cria Contato Bot": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Cria Automação Empresas", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
}, | ||
"Cria Inbox Start": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Cria Contato Bot", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
}, | ||
"When clicking \"Execute Workflow\"": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Info Base", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
}, | ||
"Cria Automação Empresas": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Cria Automação Inboxes", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"active": false, | ||
"settings": {}, | ||
"versionId": "78f155dc-7809-4bfc-9282-63f49b07fc4d", | ||
"id": "BSATyGpGWLR4ZwNm", | ||
"meta": { | ||
"instanceId": "4ff16e963c7f5197d7e99e6239192860914312fea0ce2a9a7fd14d74a0a0e906" | ||
}, | ||
"tags": [] | ||
} |
Oops, something went wrong.