Description
Retrieves a template and populates it with the data provided in the personalisation object.
Parameters
Name | Type | Description |
---|---|---|
templateId | String, required | The ID of the template to use |
personalisation | Object, optional | The fields to input into the template |
apiKeyName | String, optional | Specify the name of the API key you want to use. Names and keys are defined in the worker configuration. If not supplied the default will be used |
Example Request
function(params, credentials) {
let result = this.callWorkerMethod("govnotify", "previewTemplate", {
"templateId": "0000-0000-0000",
"personalisation": {
"firstName": "John",
"lastName": "Smith"
},
});
return result;
}
Last modified on August 01, 2023