The uploaded template file must be XHTML HTML or Docx file. Template supports inline CSS and all markup attributes. The sample you may download here: html and docx.
You can use predefined variables as ${varname} in template. Following variables are supported:
...