Zapier
Render a PDF or image from an oJo template in a Zap, with the Webhooks by Zapier step and your API key. There is no oJo app in Zapier yet.
Before you start
- An oJo API key .
- A saved template and its ID. See Create Template, or start from the gallery.
- A Zapier plan that includes Webhooks by Zapier. Zapier lists it on paid plans, not on Free.
1. Add the step
Add an action, choose Webhooks by Zapier, then the event Custom Request. It sends the body
exactly as you write it, which nested JSON such as modify needs.
2. Fill in the request
| Field | Value |
|---|---|
| Method | POST |
| URL | https://api.ojo.so/v1/pdf/template |
| Data | the JSON below |
| Headers | Authorization: Bearer <your API key> and Content-Type: application/json |
{
"templateId": "<Template ID>",
"modify": {
"invoice": { "number": "INV-2026-0143" },
"customer": { "name": "Acme Inc." }
}
}Replace <Template ID>, shape modify like your template’s variables, and map fields from earlier
steps in place of the sample values. Get Template lists every field a template
reads.
For a PNG, use https://api.ojo.so/v1/image/template with the same body. The response then holds
imageUrl.
Zapier inserts mapped values as they are. A value with a double quote or a line break breaks the JSON, so clean such fields with a Formatter step first.
3. Use the file
Test the step. The response holds pdfUrl, pages and credits. pdfUrl has no scheme, so in
a later step type https:// and map pdfUrl right after it, for example in an email, a Slack
message or a Google Drive upload.
When it fails
| Status | Meaning |
|---|---|
| 400 | The body is not valid JSON. |
| 401 | The Authorization header is not Bearer followed by a valid key. |
| 402 | Out of credits. |
| 422 | The request was refused before rendering, for example a missing templateId. The message says why. |
| 429 | Too many requests. Add a Delay step. |
Want an oJo app in Zapier instead? Tell us.