IremboHub generates PDF certificates by merging a FreeMarker HTML template with application data at the moment a GENERATE_CERTIFICATE workflow action fires.
.html) that references application variables with .vars["variableName"] syntax.list_certificate_templates to get the template's code.GENERATE_CERTIFICATE action under certificateTemplateCode.Use generate_certificate_template to produce a complete, print-ready FreeMarker HTML file from a structured spec:
Generate a certificate template for the Business Registration service in English.
Fields: businessName (TEXT), registrationDate (DATE), businessType (SELECT).
Include an expiry date. Write the file to /tmp/business-registration-cert.html
The tool returns:
template_html — the generated FreeMarker HTML (or writes to output_path)bound_variables — the variables bound from your input spec; note this reflects the fields you passed, not a scan of the output HTML, so a field left out of every sections entry still appears here even though it won't render (see Template Authoring)issues / suggestions — validation feedbackAfter uploading the file, call list_certificate_templates to retrieve its code, then reference that code in the workflow action.
A service typically needs one template per supported language. Run generate_certificate_template once for each language (en-US, fr-FR, rw-RW) and upload all three. certificateTemplateCode on the workflow action uses the short locale keys (en, fr, rw), not the tool's language values — map each template's code accordingly:
"certificateTemplateCode": {
"en": "BIZREG_CERT_EN",
"fr": "BIZREG_CERT_FR",
"rw": "BIZREG_CERT_RW"
}
See Template Authoring for the full list of standard variables, FreeMarker syntax rules, and examples.