Strapi integration

Generate PDFs from Strapi

Connect Quaterio to your Strapi instance, bind collection fields to block-based templates and render paginated PDFs on demand or in batch. Works with v4 and v5, the connector handles both response shapes with one path change.

The problem

Strapi is the open source headless CMS many product teams pick to own their content model. PDF output is one of the things that never made the roadmap. Custom Express endpoints, Puppeteer scripts and bespoke templates pile up; every content model change breaks them.

How Quaterio handles it

Quaterio's Strapi connector reads /api/{collection} with your API token and drops collection fields into a block-based template. v4 and v5 are both supported. Populate parameters, filters and sort all pass through on the URL. Your engineers stop maintaining a separate PDF pipeline.

How it works

  1. 1

    Generate an API token in Strapi admin

    Settings → API Tokens → Create new API Token. Pick "Read-only", paste a name, choose Unlimited duration and copy the token from the screen that follows. The token is shown once only.

  2. 2

    Pick the Strapi preset in Connections

    Settings → Connections → New Connection → pick "Strapi" from the type dropdown. Replace yoursite.com with your Strapi host and articles with your collection name. Paste the API token into the Token field.

  3. 3

    Hit Detect Fields to confirm the shape

    Quaterio fetches /api/{collection} and shows the JSON paths available. For v4 the default data.0.attributes.content works. For v5 drop the .attributes segment, change the Response Field to data.0.content.

  4. 4

    Generate the PDF via the editor or API

    Export from the editor for one-offs. For batch jobs hit POST /api/v1/generate/template with the template ID. The connector re-fetches at generation time so every PDF reflects the latest Strapi content.

What the connector handles

  • Strapi v4 REST API: data.0.attributes.* shape supported by default
  • Strapi v5 REST API: data.0.* flat shape supported with a one-line response field tweak
  • API Token authentication via the Authorization Bearer header
  • Read-only tokens recommended, writes are never needed for PDF generation
  • Populate parameter (?populate=*) for relations, components and media
  • Filter, sort, fields and pagination query parameters pass through on the URL
  • Media URLs resolved at PDF render time when binding to image blocks
  • Self-hosted, Strapi Cloud and Enterprise installs all work the same way
  • Detect Fields walks the response so you can pick paths in the editor
  • 15 second fetch timeout, cached on the block when the API is slow or unreachable

Generate via API

# 1. Create the connection via the dashboard (one-time setup). # 2. Bind a template's Remote Content block to it. # 3. Generate a PDF that pulls live Strapi content: curl -X POST https://quaterio.com/api/v1/generate/template \ -H "Authorization: Bearer q_your_token" \ -H "Content-Type: application/json" \ -d '{ "templateId": "strapi_article_export" }' # → { # "ok": true, # "data": { "downloadUrl": ".../article_en_a7f3b2c1.pdf" } # } # The connector hits your /api/{collection} endpoint at generation # time and renders the bound collection field into the template.

Available on Business plan and above.

Strapi and PDF: the real questions

The Strapi preset queries /api/{collection} on your Strapi instance with an API token in the Authorization header. The default response field assumes Strapi v4 shape (data.0.attributes.content). v5 uses a flatter shape; the connector handles both with one path change. The sections below cover token setup, the v4 vs v5 split, populate parameters and self-hosted deployment.

Generating an API token in Strapi admin

In Strapi admin, go to Settings → API Tokens → Create new API Token. Give it a name, set the type to "Read-only" (writes are not needed for PDF generation), pick "Unlimited" or a sensible duration and copy the token from the screen that follows. You only see the full token once, paste it into Quaterio immediately.

Token permissions follow the content types you have explicitly enabled. Even a Read-only token cannot fetch a collection that does not have its find or findOne permission granted under Settings → Users & Permissions → Roles → Public (or the custom role tied to the token). 403 responses on Detect Fields are almost always this.

Strapi v4 vs v5 response shape (the one thing to know)

Strapi v4 wraps content type fields under an attributes object: { data: [{ id, attributes: { content, title } }], meta: {...} }. The default Response Field on the preset is data.0.attributes.content, which targets v4. Most Strapi installs in production today are still v4.

Strapi v5 flattens this. The shape becomes { data: [{ id, documentId, content, title }], meta: {...} }. If your install is on v5, change the Response Field to data.0.content (drop the .attributes segment). The URL and auth do not change between versions, only the response navigation path.

Populate parameter for relations and media

By default Strapi returns only top-level scalar fields. Linked entries, components, dynamic zones and media are omitted. Add ?populate=* to the URL to populate one level deep (covers most simple PDF templates) or ?populate[field][populate]=* for deeper navigation.

For media (images, files), Strapi returns a media object with a url field that is typically relative to the Strapi host. Quaterio resolves these to absolute URLs at render time when binding to image blocks. If your media lives in an S3 bucket or CDN, the url field is already absolute.

Filtering, sorting and pagination

Strapi supports filters, sort, fields and pagination as query parameters straight on the URL. Example: ?filters[status][$eq]=published&sort=publishedAt:desc&pagination[limit]=10. Add these to the connection URL and they are passed through on every fetch.

Pagination uses page or limit/offset modes. For single-record PDF templates use limit=1 plus the right filter. For batch jobs that generate one PDF per record, fetch the full collection in one Quaterio connection and pass the index as a variable on the API call.

Self-hosted by definition, what that means for connectivity

Strapi is self-hosted. Quaterio fetches from your Strapi URL at PDF generation time, so that URL needs to be reachable from the public internet (or from whichever Quaterio host the connector runs on). Strapi instances behind a VPN or private network cannot be read directly.

Common patterns: deploy Strapi on Strapi Cloud, Render, Railway, AWS or DigitalOcean with a public HTTPS endpoint and lock it down with API tokens. Or run a public proxy that fronts a private Strapi install and forwards the Authorization header. The connector does not care which.

Rate limits and caching

Strapi does not enforce rate limits at the framework level. Whatever your hosting provider allows is what you get. For high-volume PDF batch jobs, watch your Strapi server CPU, each PDF generation triggers one fetch, and 100 batched rows mean 100 concurrent reads at default settings.

The Quaterio batch default concurrency is 5; lower it if you see Strapi struggling. Alternatively cache common queries in Strapi itself via the @strapi/plugin-i18n cache layer or a Redis-backed adapter. Quaterio also caches the last successful fetch on the block, so transient downtime does not break the PDF.

Strapi Cloud vs Strapi Community

Strapi Cloud is the managed version with built-in HTTPS, backups and scaling. From the Quaterio side it is identical to self-hosted, same /api/{collection} endpoint, same API token mechanism. The host is the *.strapiapp.com subdomain Strapi assigns or a custom domain.

Community Edition is the open source version you install yourself. The API behaves the same; you handle the infrastructure. Enterprise Edition adds SSO and role-based content access, neither affects the REST API contract.

Pricing and plan tier

CMS connections are part of the Business plan and above ($30/mo). Pro plans get the editor and basic templates but not the Remote Content block. Free and Pro users who try to add a Remote Content block see an upgrade prompt.

Strapi is free to self-host. Strapi Cloud starts at $15/mo. The REST API is included on every Strapi tier; there is no extra cost for reading from Strapi into Quaterio.

Try the Strapi connector free

Set up the connection in two minutes. No credit card required to start.