|
128 | 128 | "type": "n8n-nodes-base.httpRequest", |
129 | 129 | "typeVersion": 3, |
130 | 130 | "position": [ |
131 | | - 2380, |
| 131 | + 2360, |
132 | 132 | 840 |
133 | 133 | ] |
134 | 134 | }, |
135 | 135 | { |
136 | 136 | "parameters": { |
137 | | - "fromEmail": "contato@agenciadgcode.com", |
| 137 | + "fromEmail": "={{ $('Info Base').item.json[\"from_email\"] }}", |
138 | 138 | "toEmail": "={{ $('LimpaDados').item.json.email }}", |
139 | | - "subject": "Bem vindo ao Chatwoot", |
140 | | - "text": "=Olá seja bem vindo:\n\nAbaixo segue seus dados de acesso iniciais:\n\nURL: {{ $('Info Base').item.json[\"chatwoot_url\"] }}\n\nLoging: {{ $('LimpaDados').item.json[\"email\"] }}\n\nSenha: {{ $('LimpaDados').item.json[\"password\"] }}", |
| 139 | + "subject": "=Bem vindo à {{ $('Info Base').item.json[\"organization\"] }}", |
| 140 | + "text": "=Olá seja bem vindo:\n\nAbaixo segue seus dados de acesso:\n\nURL: {{ $('Info Base').item.json[\"chatwoot_url\"] }}\n\nuser: {{ $('LimpaDados').item.json[\"email\"] }}\n\nSenha: {{ $('LimpaDados').item.json[\"password\"] }}", |
141 | 141 | "options": {} |
142 | 142 | }, |
143 | 143 | "id": "2d0b3e35-6e51-4e9b-90b4-6382dc6fec88", |
144 | 144 | "name": "Send Email", |
145 | 145 | "type": "n8n-nodes-base.emailSend", |
146 | 146 | "typeVersion": 2, |
147 | 147 | "position": [ |
148 | | - 3180, |
| 148 | + 3160, |
149 | 149 | 840 |
150 | 150 | ], |
151 | 151 | "credentials": { |
|
161 | 161 | "string": [ |
162 | 162 | { |
163 | 163 | "name": "api_access_token", |
164 | | - "value": "TOKEN PLATAFORM" |
| 164 | + "value": "CHATWOOT_PLATFORM_TOKEN" |
165 | 165 | }, |
166 | 166 | { |
167 | 167 | "name": "chatwoot_url", |
|
171 | 171 | "name": "n8n_url", |
172 | 172 | "value": "https://N8N_URL" |
173 | 173 | }, |
| 174 | + { |
| 175 | + "name": "organization", |
| 176 | + "value": "ORGANIZATION_NAME" |
| 177 | + }, |
| 178 | + { |
| 179 | + "name": "logo", |
| 180 | + "value": "ORGANIZATION_LOGO" |
| 181 | + }, |
| 182 | + { |
| 183 | + "name": "from_email", |
| 184 | + "value": "FROM_EMAIL" |
| 185 | + }, |
174 | 186 | { |
175 | 187 | "name": "name", |
176 | 188 | "value": "={{ $json.name_company }}" |
|
249 | 261 | }, |
250 | 262 | "sendBody": true, |
251 | 263 | "specifyBody": "json", |
252 | | - "jsonBody": "={\n \"inbox_id\": {{ $('Cria Inbox Start').item.json[\"id\"] }},\n \"name\": \"EvolutionAPI\",\n \"phone_number\": \"+123456\",\n \"avatar_url\": \"https://evolution-api.com/files/evolution-api-favicon.png\"\n}", |
| 264 | + "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}", |
253 | 265 | "options": {} |
254 | 266 | }, |
255 | 267 | "id": "974e672e-fa4a-44ab-b6df-7aacd2bdb329", |
256 | 268 | "name": "Cria Contato Bot", |
257 | 269 | "type": "n8n-nodes-base.httpRequest", |
258 | 270 | "typeVersion": 3, |
259 | 271 | "position": [ |
260 | | - 2800, |
| 272 | + 2760, |
261 | 273 | 840 |
262 | 274 | ] |
263 | 275 | }, |
|
276 | 288 | }, |
277 | 289 | "sendBody": true, |
278 | 290 | "specifyBody": "json", |
279 | | - "jsonBody": "={\n \"name\": \"Create Inbox EvolutionAPI\",\n \"description\": \"Create Inbox EvolutionAPI\",\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={{ $('Cria Usuario').item.json.access_token }}\"]\n }\n ],\n \"conditions\": \n [\n {\n \"attribute_key\": \"content\",\n \"filter_operator\": \"contains\",\n \"query_operator\": \"and\",\n \"values\": [\"start:\"]\n },\n {\n \"attribute_key\": \"phone_number\",\n \"filter_operator\": \"equal_to\",\n \"query_operator\": \"or\",\n \"values\": [\"+123456\"]\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}", |
| 291 | + "jsonBody": "={\n \"name\": \"Create Inbox {{ $('Info Base').item.json[\"organization\"] }}\",\n \"description\": \"Create Inbox EvolutionAPI\",\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={{ $('Cria Usuario').item.json.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 \"attribute_key\": \"phone_number\",\n \"filter_operator\": \"equal_to\",\n \"query_operator\": \"or\",\n \"values\": [\"+123456\"]\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}", |
280 | 292 | "options": {} |
281 | 293 | }, |
282 | 294 | "id": "fb5597d4-0af1-461b-912b-7671a88c8368", |
283 | 295 | "name": "Cria Automação", |
284 | 296 | "type": "n8n-nodes-base.httpRequest", |
285 | 297 | "typeVersion": 3, |
286 | 298 | "position": [ |
287 | | - 3000, |
| 299 | + 2960, |
288 | 300 | 840 |
289 | 301 | ] |
290 | 302 | }, |
|
303 | 315 | }, |
304 | 316 | "sendBody": true, |
305 | 317 | "specifyBody": "json", |
306 | | - "jsonBody": "={\n \"name\": \"StartEvolution\",\n \"channel\": {\n \"type\": \"api\",\n \"website_url\": \"\"\n }\n}", |
| 318 | + "jsonBody": "={\n \"name\": \"Start {{ $('Info Base').item.json[\"organization\"] }}\",\n \"channel\": {\n \"type\": \"api\",\n \"website_url\": \"\"\n }\n}", |
307 | 319 | "options": {} |
308 | 320 | }, |
309 | 321 | "id": "a09bc90a-d643-422c-90ae-f8baa41ee532", |
310 | 322 | "name": "Cria Inbox Start", |
311 | 323 | "type": "n8n-nodes-base.httpRequest", |
312 | 324 | "typeVersion": 3, |
313 | 325 | "position": [ |
314 | | - 2600, |
| 326 | + 2560, |
315 | 327 | 840 |
316 | 328 | ] |
317 | 329 | }, |
|
435 | 447 | }, |
436 | 448 | "active": true, |
437 | 449 | "settings": {}, |
438 | | - "versionId": "5638171c-d64e-404f-b0f1-c8fbe4ec6fb0", |
| 450 | + "versionId": "98d3de5d-b1b2-4e13-b6e6-07fa827f54fd", |
439 | 451 | "id": "mVLlfZvGjtR8SZLT", |
440 | 452 | "meta": { |
441 | 453 | "instanceId": "4ff16e963c7f5197d7e99e6239192860914312fea0ce2a9a7fd14d74a0a0e906" |
|
0 commit comments