I am trying to perform a Mail Merge using Aspose.Words Cloud API v4 from Salesforce Apex. My goal is:
- Take a DOCX template and XML data (currently stored as Salesforce Static Resources or already uploaded in Aspose Storage).
- Execute Mail Merge to generate a PDF.
- Obtain the PDF as Base64 and/or a download URL in Salesforce.
I have tried the following approaches:
- Using the
MailMergeclass from the Aspose Salesforce sample (Utils.cls) withExecuteMailMerege()pointing to files in Aspose Storage. This returns 404 Not Found. - Attempting direct REST callouts to
/words/{filename}/executeMailMergeand/words/mailMergeendpoints. Also returns 404. - Generating an access token works fine, and I can list Storage folders and files correctly.
It seems that in v4, the library or endpoints do not support performing Mail Merge using files already in Storage from Salesforce Apex.
My question:
- What is the correct way to perform Mail Merge in Salesforce Apex using files in Aspose Storage with v4 API?
- Can I use
MailMerge.ExecuteMailMerege()with Storage files, or do I have to send the template and XML “online” in the request? - Is there an example for Salesforce Apex that performs Mail Merge with Storage files and returns PDF (Base64 or download URL)?
Thank you!