Text to PDF connects to a Nagent workspace with no credentials. Once it is connected, agents can call 6 Text to PDF actions, such as "Convert Text to PDF", "Delete Async Job" and "Delete File". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Text to PDF, with input parameters and output schema.
TEXT_TO_PDF_CONVERT_TEXT_TO_PDFConvert plain text or Markdown content into a downloadable PDF document. Supports Unicode characters, special symbols, and Markdown formatting including headers, lists, code blocks, links, and emphasis. Images require publicly accessible URLs to render. Response PDF URL is at `data.file.s3url`; also returns `data.file.name` and `data.file.mimetype`.
Input parameters
The text content to convert to PDF. For 'txt' format, text is rendered as-is. For 'markdown' format, Markdown syntax will be parsed and styled. Must contain the complete, final content inline — document IDs, URLs, or external references are not accepted. Empty or placeholder text produces a nearly blank PDF. Malformed Markdown (unclosed lists, improperly nested headings, mixed HTML) degrades PDF structure; normalize before conversion.
The format of the input text. Use 'txt' for plain text (preserves whitespace and formatting) or 'markdown' for Markdown-formatted text (supports headers, lists, bold, links, etc.) Only `'txt'` and `'markdown'` are accepted; any other value causes failure. Mismatching format to content (e.g., passing Markdown as `'txt'`) degrades headings, lists, and tables in output.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TEXT_TO_PDF_DELETE_ASYNC_JOBTool to delete an asynchronous conversion job. Use when a job is no longer required to free up server resources. Jobs are automatically deleted after 3 hours if not manually removed.
Input parameters
The unique identifier of the asynchronous conversion job to delete. This ID is returned when creating an async conversion job.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TEXT_TO_PDF_DELETE_FILETool to delete a file from ConvertAPI server. Use when a file is no longer needed and should be removed from temporary storage.
Input parameters
The unique identifier of the file to delete from ConvertAPI server. Files are automatically deleted after 3 hours if not manually deleted.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TEXT_TO_PDF_DOWNLOAD_FILEDownload a file from ConvertAPI server using its unique File ID. Use this after converting or uploading files to retrieve the result. The file must exist on the server and not be expired.
Input parameters
The unique identifier of the file to download from ConvertAPI server. Obtained from a previous file upload or conversion response.
Download behavior: 'attachment' to download the file, 'inline' to view it in browser. Defaults to 'attachment' if not specified.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TEXT_TO_PDF_START_ASYNC_CONVERSIONStart an asynchronous file conversion job using ConvertAPI. Returns a JobId that can be used to poll for conversion results. Optionally supports WebHook callback for push notification when conversion completes.
Input parameters
File to be converted. Value can be a public URL pointing to the file or the file content itself.
Custom job ID for tracking the conversion. Must be exactly 32 characters long, lowercase alphanumeric only. If not provided, the API will generate one automatically.
URL to receive POST notification when conversion completes. The API will send the conversion results to this webhook URL upon completion.
Target file format (e.g., 'pdf'). This is the desired output format for the converted file.
Source file format (e.g., 'txt', 'docx', 'html'). This is the format of the input file to be converted.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TEXT_TO_PDF_UPLOAD_FILEUpload a file to ConvertAPI server for subsequent conversions. Supports direct file upload or remote URL upload. Files are stored securely for up to 3 hours and can be referenced by File ID in conversion requests.
Input parameters
Remote file URL to upload to ConvertAPI server. The file will be downloaded from this URL and stored on ConvertAPI. Either 'file' or 'url' must be provided, not both.
The file to upload to ConvertAPI server. Either 'file' or 'url' must be provided, not both.
Custom ID for the file. Must be a lowercase alphanumeric character string. If not provided, ConvertAPI will generate a random ID. This ID can be used to reference the file in subsequent conversion requests.
Custom filename for the uploaded file. If not provided, the original filename will be used. For direct file uploads, this overrides the original filename. For URL uploads, this is required if the URL doesn't contain a clear filename.
Remote file request header field name. Only used with 'url' parameter to provide custom headers when downloading the remote file.
Remote file request header field value. Only used with 'url' and 'header_name' parameters.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 6 Text to PDF actions on Nagent, including "Convert Text to PDF", "Delete Async Job" and "Delete File". Convert Text to PDF: Convert plain text or Markdown content into a downloadable PDF document. Each action is listed on this page with its input parameters and its output.
Text to PDF connects with no credentials, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Convert Text to PDF takes 2 required inputs: text and file_type. It returns data, error and successful.