Certificates
How IremboHub generates certificates — the template system, authoring flow, and workflow wiring.
IremboHub generates PDF certificates by merging a FreeMarker HTML template with application data at the moment a GENERATE_CERTIFICATE workflow action fires.
How it works
- Author a FreeMarker HTML template (
.html) that references application variables with.vars["variableName"]syntax. - Upload the template in the Service Management Portal → Document Generation.
- Call
list_certificate_templatesto get the template'scode. - Wire the code into the workflow's
GENERATE_CERTIFICATEaction undercertificateTemplateCode.
Generating a template with the AI
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.htmlThe tool returns:
template_html— the generated FreeMarker HTML (or writes tooutput_path)bound_variables— the variables bound from your input spec; note this reflects thefieldsyou passed, not a scan of the output HTML, so a field left out of everysectionsentry still appears here even though it won't render (see Template Authoring)issues/suggestions— validation feedback
After uploading the file, call list_certificate_templates to retrieve its code, then reference that code in the workflow action.
One template per locale
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"
}What can go into a template
See Template Authoring for the full list of standard variables, FreeMarker syntax rules, and examples.