View as Markdown
APITemplate.io icon

APITemplate.io ACTION

Create a PDF

Create a PDF file with JSON data and your template. See the docs for more information
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's APITemplate.io account once, then configure and run Create a PDF from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "apitemplate_io-create-pdf",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    apitemplate_io: { authProvisionId: "apn_xxxxxxx" },
    apiEndpoints: "API Endpoints",
    templateId: "Template Id",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create a PDF inputs
Property Type Description
apiEndpoints API Endpoints string
A regional API endpoint is intended for customers in the same region. The data for the request and generated PDFs/images are processed and stored within the region. see docs
Optional
templateId Template Id string
The ID of the template that you want to use.
Required Dynamic
data Data any
Object to replace values on the template, you can check here for the JSON example for your template.
Required
expiration Expiration integer
Expiration of the generated image in minutes(default to 0, store permanently).
Optional
meta Meta string
Specify an external reference ID for your own reference. It appears in the list-objects API.
Optional
exportType Export Type string
Either file or json(Default).
Optional
outputHtml Output HTML boolean
Whether it should output html or not
Optional
outputFormat Output Format string
Either pdf(Default) or html.
Optional
filename Filename string
Default to UUID (e.g 0c93bd9e-9ebb-4634-a70f-de9131848416.pdf). Use this to specify custom file name, it should end with .pdf
Optional
imageResampleRes Image Resample Res integer
We embed the original images by default, meaning large PDF file sizes. Specifying this option helps reduce the PDF file size. Common values are 72, 96, 150, 300 and 600.
Optional
isCmyk Is CMYK boolean
Use CMYK color profile, Default to false
Optional
async Async boolean
To generate PDF asynchronously, set the value to true and the API call returns immediately. Once the PDF document is generated, we will make a HTTP/HTTPS GET to your webhook and will retry for 3 times before giving up.
Optional
webhookUrl Webhook URL string
It is the URL of your webhook URL, it starts with http:// or https:// and has to be urlencoded.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
apitemplate_io-create-pdf
Version
0.0.2
App
APITemplate.io
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes