Create certificates from CSV

To generate certificate PDFs from CSV, publish a DocKiln Certificate template, supply one recipient per row, and run the provided Python script. The script submits each row to the document API, waits for completion, and downloads each PDF before moving to the next recipient.

Prepare the recipient list

Export a spreadsheet as UTF-8 CSV. Use one row per recipient and format the completion date as text so spreadsheet locale settings do not change it.

name,course,date
Morgan Lee,Document design,2026-07-18
"Ellis, Taylor",Print production,2026-07-19

Configure and run the generator

Publish the Certificate starter. Set its ID in CERTIFICATE_TEMPLATE_ID, set DOCKILN_API_KEY, and set DOCKILN_URL to your instance. Download certificates.py and run it in an empty output directory.

python3 certificates.py recipients.csv

The standard-library script maps the name to the recipient and the course and date to a table row. It waits for each PDF before starting another. Each submitted row consumes one generation. After a failure, remove completed rows before retrying and use a fresh output directory.

Can you resume a failed batch?

The provided example is sequential and does not automatically resume an entire batch. Keep the completed files, remove completed rows from the input, and start the remaining rows in a new output directory. Review any ambiguous submission before retrying so you do not create duplicates.

What should you validate first?

Generate a two-row sample before submitting the full list. Check names with accents, long course titles, dates, certificate orientation and page count. Quote CSV fields containing commas; keep dates as explicit text. Each accepted row consumes one generation, even if rendering later fails.

Try the certificate template, read template versioning, and check usage rules before running a large batch.