Skip to content

Message Duplication When Sending Multiple Attachments via Chatwoot + Evolution API v2.3.0 #1681

@Fernasoft-Sistemas

Description

@Fernasoft-Sistemas

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

When sending a message through Chatwoot integrated with the Evolution API (WhatsApp), containing text and multiple attachments (e.g., images, PDFs) in a single payload, the text is repeated for each file—resulting in duplicate messages on WhatsApp.

Steps to Reproduce:

Use Evolution API v2.3.0 integrated with Chatwoot.

Send a message with text and two or more attachments in a single payload.

Observe that the recipient receives the text multiple times, each accompanied by a different attachment.

What did you expect?

The text should be sent only once, followed by multiple attachments without repetition.

What did you observe instead of what you expected?

The text is repeated for each attachment, causing redundant messages.

Screenshots/Videos

No response

Which version of the API are you using?

Evolution API: v2.3.0
Chatwoot: v4.3.0

What is your environment?

Windows

Other environment specifications

Environment: Docker

If applicable, paste the log output

No response

Additional Notes

Possible Root Cause:
This issue appears to be related to how the API iterates over each attachment and reuses the same text block without checking if it's already been sent. A similar issue was reported in previous versions.
github.com

Suggested Fix:

Group attachments under a single message context.

Flag the text to be sent only once per batch.
[github.com](https://github.com/EvolutionAPI/evolution-api/issues/1468?utm_source=chatgpt.com)

References:

Original issue (#1468) reporting duplication with multiple attachments in v2.2.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions