POSTing the JSON to the function will download the DOCX template from the _TEMPLATE_URL parameter, and attempt to replace any tokens in the format of ((token)) with the values provided in the JSON.
Two implementations of the same code, as C# for traditional deployment, or CSX script.
Project contains C# source targetting V3 Azure Functions.
- Replace run.csx
- Upload function.proj
HTTP POST to the function
{
"_TEMPLATE_URL" : "https://xyz.blob.core.windows.net/templates/Template.docx",
"username" : "xyz@dev",
"password" : "12345",
"uri" : "https://somewhere.com",
}
The return value is file of application/vnd.openxmlformats-officedocument.wordprocessingml.document.