We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

Mail Merge Word documents using Aspose.Words Cloud API without using the cloud storage

Hi,

We are using the words and cells for around 2 years now.
Currently the way we use the service is very inefficient and we want to make it better.
In order to render a pdf (or an excel), we’re doing the following steps:

  • Get the file listing of the folder.
  • If no folder exist Create the folder.
  • Populate document template with data.
  • Export the document into the specified format.
  • Remove the file.
  • Remove the folder.
    We’re doing all this steps because we don’t want the rendered documents to stay on the aspose server, we just want to use the service for the rendering part.

What is the best practice for achieving what we want?
Can’t we just get the rendered document in one call that will automatically remove the instance from the server?

Thanks,
Yishay

@yishayh

Thank you for contacting Aspose Support.

You can use PUT /words/executeTemplate API or PUT /words/executeMailMerge API that let you send Template document and Data file in request’s body; and returns output document in API response. So you do not need to upload and delete input documents in separate API calls. Please check the documentation for the cURL and SDK Examples of these APIs:

  1. Populate Mustache Template with Data Online
  2. Populate MailMerge Template with Data Online

Secondly, if you are not comfortable with Aspose Cloud Storage you can use third party storage like Amazon, Azure, Dropbox etc. Please check How to Configure 3rd Party Cloud Storages article for more details.

@yishayh

Please note in the latest API Version V4.0 we have simplified Mail Merge APIs. We have combined Mail Merge and Mustache Template APIs. Now you can use the following ExecuteMailMergeOnline API method to populate both Mail Merge and Mustache Templates.

PUT ​/words​/MailMerge Executes document mail merge online.