Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RESOLVIDO] IMPORTAÇÃO DE HISTORICO DE CONVERSAS DO WHATSAPP PARA O CHATWOOT #480

Closed
guilhermejansen opened this issue Mar 19, 2024 · 0 comments

Comments

@guilhermejansen
Copy link

          Olá meu caro amigo @jaison-x encontrei um erro na importação das mensagens para o chatwoot poderia me ajudar a solucionar esse caso?

LOG ANTERIOR

[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  provider found 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  provider found 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  create client to instance: setupautomatizado4 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  client created 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  format phone number 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  find contact in chatwoot 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  return contact 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  get inbox to instance: setupautomatizado4 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  get inbox to instance: setupautomatizado4 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  get client to instance: setupautomatizado4 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  get provider to instance: setupautomatizado4 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Finding chatwoot 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Getting instance name 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootRepository]  [string]  finding chatwoot 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootRepository]  [string]  finding chatwoot in db 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot account id: 1 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot token: HDM12121WEWEVkkBdZEb 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot url: https://chat.setupautomatizado.com.br 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot inbox name: setupautomatizado4 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot sign msg: true 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot sign delimiter: undefined 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot reopen conversation: true 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot conversation pending: false 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot import contacts: true 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot import messages: true 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [WAStartupService]  [string]  Chatwoot days limit import messages: 60 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  provider found 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  provider found 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  create client to instance: setupautomatizado4 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  client created 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     VERBOSE   [ChatwootService]  [string]  find inboxes in chatwoot 

ERROR

[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     ERROR   [ChatwootImport]  [string]  Error on get recent conversations: Error: The server does not support SSL connections 
[Evolution API]  v1.7.0  1   -  Tue Mar 19 2024 18:08:41     ERROR   [ChatwootService]  [string]  Error on update avatar in recent conversations: TypeError: Cannot read properties of undefined (reading 'map') 

INSTANCIA CRIADA NO CHATWOOT

image

CURL USADA NA REQUEST

curl --location 'https://evo.setupautomatizado.com.br/instance/create' \
--header 'Content-Type: application/json' \
--header 'apikey: f4FDFDF2323232424240' \
--data '{
    "instanceName": "setupautomatizado4",
    "token": "f4FDFDF2323232424240",
    "qrcode": true,
    "number": "559999999999 (Recipient number with Country Code)",
    "chatwoot_account_id": 1,
    "chatwoot_token": "H121212121212ZEb",
    "chatwoot_url": "https://chat.setupautomatizado.com.br",
    "chatwoot_sign_msg": true,
    "chatwoot_reopen_conversation": true,
    "chatwoot_conversation_pending": false,
    "sign_msg": true,
    "sign_delimiter": "\n",
    "import_contacts": true,
    "import_messages": true,
    "days_limit_import_messages": 0,
    "reject_call": false,
    "msg_call": "",
    "groups_ignore": true,
    "always_online": true,
    "read_messages": true,
    "read_status": true,
    "sync_full_history": true
}'

MEU .ENV DOCKER

  - CHATWOOT_MESSAGE_DELETE=true
  - CHATWOOT_IMPORT_DATABASE_CONNECTION_URI=postgresql://postgres:SENHA@IP:5432/chatwoot
  - CHATWOOT_IMPORT_DATABASE_PLACEHOLDER_MEDIA_MESSAGE=true

Originally posted by @guilhermejansen in #395 (comment)

RESOLVIDO!

Resolvido o problema de conexão com o postgres por conta do SSL !

image

Ponto de correção: ( ignorar o ssl "?sslmode=disable" )

  • CHATWOOT_MESSAGE_DELETE=true

  • CHATWOOT_IMPORT_DATABASE_CONNECTION_URI=postgresql://postgres:SENHA@IP:5432/chatwoot?sslmode=disable

  • CHATWOOT_IMPORT_DATABASE_PLACEHOLDER_MEDIA_MESSAGE=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant