How to process Microsoft Word Mail Merge feature in Nodejs using Aspose.Words REST API

I would like to get into use Aspose Cloud, but am really struggling with the lack of docs. Many of the links on the frontend are dead - like this for example:

Are there any plans to improve the NodeJs docs? I would really like more documentation on the wordsApi.postExecuteTemplate method, for example.

Specifically, would like to know the format for the data parameter in the request. The only docs for this method are in the dotnet and PHP SDKs, and they seem to use XML data which is stored as a file locally. Is this also the way that the NodeJS SDK works?

Is there any way of, say, passing a JSON object with the mustache template values?

Thanks

Tom

@Tomkerswill

Thanks for your interest in the aspose.cloud. We are already working on the documentation and hopefully these will be improved very soon.

Please check following documentation link for aspose.cloud UI help topics.

Yes, we are in process to add the code examples of all supported SDKs in the documentation. We will update Node.js examples soon. Meanwhile, please find Node.js sample code for populating mustache template with data. It is using XML data, but you may also pass json data as file.

Furthermore, following directory contains the Unit Tests (examples) of each Node.js SDK API: https://github.com/aspose-words-cloud/aspose-words-cloud-node/tree/master/test

Please note, the Unit Tests are grouped by the type of action over the document. Action could be one of two types: we can somehow change document elements, e.g. bookmarks, fields etc. or we can make some document actions e.g. convert, mailmerge and so on.

That’s really great; thanks. I was able to get the merge working nicely with mustache templates within a word doc, by following the tests.

@Tomkerswill

As an update, please note since Aspose.Words Cloud 19.4 we have introduced API Version 4.0. In this version, we have joined “ExecuteMailMerge” and “ExecuteTemplate” methods. Now API has only “mailmerge” method which can be used with both template types: “mailmerge fields” or “mustashe”. The new API Version 4.0 is better in terms of memory management and API structure. So it is recommended to use the latest version of SDKs, these use V4.0.