Problem Statement: #
A document generated using the Document Generator in LeadSquared was configured to be stored in a Lead Custom File Set (CFS) field:
However, while sending a WhatsApp template:
-
The document was not getting attached in the template header.
-
When trying to fetch it in the message body, only the file name appeared.
-
No clickable document link was displayed.
In the WhatsApp message payload, no public URL was generated, resulting in the document not being attached.

Root Cause / Known Limitation: #
-
Files stored in Lead CFS fields cannot be sent directly via WhatsApp.
-
Lead CFS fields return only the file name, not a publicly accessible URL.
-
WhatsApp requires a public URL to attach or send documents.
This is a known product limitation.
Final Solution Implemented: #
After discussion with the implementation team, the issue was resolved by modifying the storage approach:
Created a Custom Activity
-
A custom activity was created with a CFS field to store the generated document.
-
Configured Automation with Webhook
-
An automation was created to call a webhook.
-
The document is generated and published.
-
The generated document is stored in the Activity CFS field instead of the Lead CFS field.
-
Result:
-
Activity CFS fields generate a public URL.
-
The document can now be successfully sent via WhatsApp as an attachment or link.
-
-
