Documerge
Merge data into document templates with Documerge.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("documerge", action, input) resolves with the provider's answer and rejects when Documerge isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "documerge"} says whether yours can call it.
// workflows/notify.ts: call Documerge when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellDocumerge = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Documerge isn't connected.
const output = await step.run("Documerge", () =>
step.ctx.integrations.invoke("documerge", "combine_files", {
"output": "pdf",
"files": []
}),
);
step.ctx.log("Documerge answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "documerge",
"piece_action": "combine_files",
"input": {
"output": "pdf",
"files": []
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/documerge/combine_files" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"output":"pdf","files":[]}}'Actions
combine_files
Combine Files. Combine multiple files into a single PDF or DOCX
| Input | Type | Description |
|---|---|---|
outputrequired | one of "pdf" | "docx" | The format of the combined file |
filesrequired | array | Array of file identifiers to combine |
nameoptional | text | Name for the combined file |
urloptional | text | URL of a file to include (must be a valid URL) |
contentsoptional | long text | Additional content to include |
convert_file_to_pdf
Convert File to PDF. Convert a given file to PDF
| Input | Type | Description |
|---|---|---|
fileNamerequired | text | Name of the file to convert |
fileUrloptional | text | URL of the file to convert (must be a valid URL) |
contentsoptional | long text | Additional content to include |
create_data_route_merge
Create Data Route Merge. Send data to your Data Route URL
| Input | Type | Description |
|---|---|---|
routeKeyrequired | text | The key of the data route to merge |
fieldsoptional | object | Field data to merge into the document |
create_document_merge
Create Document Merge. Send data to your Merge URL
| Input | Type | Description |
|---|---|---|
documentKeyrequired | text | The key of the document to merge |
fieldsoptional | object | Field data to merge into the document |
split_pdf
Split PDF. Extract or remove specific pages from a PDF file
| Input | Type | Description |
|---|---|---|
fileNamerequired | text | Name of the PDF file |
fileUrloptional | text | URL of the PDF file (must be a valid URL) |
contentsoptional | long text | Base64 encoded file contents |
extractoptional | array | Page numbers or ranges to extract (e.g., "1", "2-5", "1, 3-5") |
removeoptional | array | Page numbers or ranges to remove (e.g., "1", "2-5", "1, 3-5") |
Details
- Id
documerge- Category
- Other
- Tags
- documents, templates, merge, pdf
- Package
@activepieces/piece-documerge@0.1.4- Runs
- Through the integration runner