View as Markdown
Trengo icon

Trengo ACTION

Upload File

Upload a file to attach to an email ticket reply. Returns { id, size, name, mime }; pass id to Send A Ticket Message's Attachment IDs. Unused uploads are removed automatically, so send the message soon after uploading. For WhatsApp, live chat or social channels, use Send A Ticket Media Message instead. Example: file = https://example.com/return-label.pdf returns { "id": 423874896, "size": 13264, "name": "return-label.pdf", "mime": "application/pdf" }. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Trengo account once, then configure and run Upload File 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: "trengo-upload-file",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    trengo: { authProvisionId: "apn_xxxxxxx" },
    file: "File Path or URL",
    fileName: "File Name",
  },
})

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.

Upload File inputs
Property Type Description
file File Path or URL string
A file URL or a path to a file in the /tmp directory (e.g. /tmp/label.pdf) (max 20 MB)
Required
fileName File Name string
The file name to show on the attachment, including the extension (e.g. return-label.pdf). Defaults to the source file's name.
Optional
syncDir SyncDir dir
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
trengo-upload-file
Version
0.0.1
App
Trengo
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes