# Plumsail Documents

> Generate documents from templates, convert files and process PDFs.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/plumsail-documents

## Actions

### Convert csv to xlsx

Converts a CSV file, uploaded or from a public URL, to an Excel XLSX workbook, with options for the header row, delimiter, locale and column mappings.

**Inputs**

- Has header records (`has_header_records`, true/false): Has header records.
- Delimiter (`delimiter`, text): Delimiter. Default: `,`.
- Locale (`locale`, text): Locale. One of: `aa-DJ`, `aa-ER`, `aa-ET`, `af-NA`, `af-ZA`, `agq-CM`, `ak-GH`, `am-ET`, `ar-001`, `ar-AE`, and 549 more. Default: `en-US`.
- Limit (`limit`, number): Limit.
- Mappings (`mappings`, text): Dictionary of parameters to rename headers and specify types for columns, where key is the header or the index of the column in the CSV. Example: {"Header1": {"Header": "NewHeader1", "Type": "Text"}, "3": {"Type": "TwoDecimal"}} Column types: General, Text, Integer, TwoDecimal, ThousandInteger, ThousandTwoDecimal, IntegerPercentage,TwoDecimalPercentage, Scientific, ShortDate, ShortDateTime, LongDate
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Convert doc to docx

Converts an older Word DOC file, uploaded or from a public URL, to the newer DOCX format. Returns a link to the new file.

**Inputs**

- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Convert docx to pdf

Converts a Word DOCX file, uploaded or from a public URL, to PDF. Returns a link to the PDF.

**Inputs**

- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Convert html to pdf

Converts an HTML file, uploaded or from a public URL, to PDF with the page size, orientation and margins you choose. Returns a link to the PDF.

**Inputs**

- Size (`size`, text): Size. One of: `A4`, `Letter`, `LetterSmall`, `Tabloid`, `Ledger`, `Legal`, `Statement`, `Executive`, `A2`, `A3`, and 4 more.
- Orientation (`orientation`, text): Orientation. One of: `Portrait`, `Landscape`.
- Margins (`margins`, text): Margins.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Convert pdf to text

Extracts the text from a PDF, uploaded or from a public URL, as plain text or HTML, optionally for a range of pages or with a password.

**Inputs**

- Result type (`result_type`, text): Result type. One of: `Raw`, `HTML`.
- Password (`password`, text): Password.
- Start page (`start_page`, number): Start page.
- End page (`end_page`, number): End page.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Convert ppt to pptx

Converts an older PowerPoint PPT file, uploaded or from a public URL, to the newer PPTX format. Returns a link to the new file.

**Inputs**

- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Convert pptx to pdf

Converts a PowerPoint PPTX file, uploaded or from a public URL, to PDF. Returns a link to the PDF.

**Inputs**

- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Convert xls to xlsx

Converts an older Excel XLS file, uploaded or from a public URL, to the newer XLSX format. Returns a link to the new file.

**Inputs**

- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Convert xlsx to pdf

Converts an Excel XLSX file, uploaded or from a public URL, to PDF. Returns a link to the PDF.

**Inputs**

- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Generate docx

Fills a Word DOCX template, uploaded or from a public URL, with the data you give. Returns a link to the finished document, as DOCX or PDF.

**Inputs**

- Locale (`locale`, text): Locale. One of: `aa-DJ`, `aa-ER`, `aa-ET`, `af-NA`, `af-ZA`, `agq-CM`, `ak-GH`, `am-ET`, `ar-001`, `ar-AE`, and 549 more. Default: `en-US`.
- Data (`data`, object): Data.
- Output type (`output_type`, text): Output type.
- Timezone (`timezone`, text): Timezone. One of: `Australia/Darwin`, `Australia/Sydney`, `Australia/Melbourne`, `Asia/Kabul`, `America/Anchorage`, `America/Juneau`, `America/Metlakatla`, `America/Nome`, `America/Sitka`, `America/Yakutat`, and 587 more.
- Engine (`engine`, text): Engine. One of: `Classic`, `Modern`. Default: `Modern`.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Generate html

Fills an HTML template, uploaded or from a public URL, with the data you give. Returns a link to the finished HTML file.

**Inputs**

- Locale (`locale`, text): Locale. One of: `aa-DJ`, `aa-ER`, `aa-ET`, `af-NA`, `af-ZA`, `agq-CM`, `ak-GH`, `am-ET`, `ar-001`, `ar-AE`, and 549 more. Default: `en-US`.
- Data (`data`, object): Data.
- Timezone (`timezone`, text): Timezone. One of: `Australia/Darwin`, `Australia/Sydney`, `Australia/Melbourne`, `Asia/Kabul`, `America/Anchorage`, `America/Juneau`, `America/Metlakatla`, `America/Nome`, `America/Sitka`, `America/Yakutat`, and 587 more.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Generate pptx

Fills a PowerPoint PPTX template, uploaded or from a public URL, with the data you give. Returns a link to the finished presentation, as PPTX or PDF.

**Inputs**

- Locale (`locale`, text): Locale. One of: `aa-DJ`, `aa-ER`, `aa-ET`, `af-NA`, `af-ZA`, `agq-CM`, `ak-GH`, `am-ET`, `ar-001`, `ar-AE`, and 549 more. Default: `en-US`.
- Data (`data`, object): Data.
- Output type (`output_type`, text): Output type.
- Timezone (`timezone`, text): Timezone. One of: `Australia/Darwin`, `Australia/Sydney`, `Australia/Melbourne`, `Asia/Kabul`, `America/Anchorage`, `America/Juneau`, `America/Metlakatla`, `America/Nome`, `America/Sitka`, `America/Yakutat`, and 587 more.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Generate xlsx

Fills an Excel XLSX template, uploaded or from a public URL, with the data you give. Returns a link to the finished workbook, as XLSX or PDF.

**Inputs**

- Locale (`locale`, text): Locale. One of: `aa-DJ`, `aa-ER`, `aa-ET`, `af-NA`, `af-ZA`, `agq-CM`, `ak-GH`, `am-ET`, `ar-001`, `ar-AE`, and 549 more. Default: `en-US`.
- Data (`data`, object): Data.
- Output type (`output_type`, text): Output type.
- Timezone (`timezone`, text): Timezone. One of: `Australia/Darwin`, `Australia/Sydney`, `Australia/Melbourne`, `Asia/Kabul`, `America/Anchorage`, `America/Juneau`, `America/Metlakatla`, `America/Nome`, `America/Sitka`, `America/Yakutat`, and 587 more.
- Engine (`engine`, text): Engine. One of: `Classic`, `Modern`. Default: `Modern`.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Get profile

Gets the connected Plumsail account's profile, including the short user ID needed to start a process.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### List process tokens

Lists the tokens a process's template expects, by its process ID, so you know what data to send when starting it.

**Inputs**

- Process (`process_id`, text, required): Process ID.

**Outputs**

- `data` (list): Response.

**Example output**

```json
{
  "data": []
}
```

### List processes

Lists the document generation processes in your Plumsail account, with each process's ID and name.

**Inputs**: None.

**Outputs**

- `data` (list): Response.

**Example output**

```json
{
  "data": []
}
```

### Pdf compress

Makes a PDF, uploaded or from a public URL, smaller, optionally without losing quality. Returns a link to the compressed PDF.

**Inputs**

- Lossless mode (`lossless_mode`, text): Lossless mode. One of: `On`, `Off`. Default: `On`.
- Password (`password`, text): Password.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Pdf protect

Adds passwords to a PDF and sets whether readers may print, change, copy from or annotate it. Returns a link to the protected PDF.

**Inputs**

- Allow printing (`allow_printing`, true/false, required): Allow printing.
- Allow modification (`allow_modification`, true/false, required): Allow modification.
- Allow extract (`allow_extract`, true/false, required): Allow extract.
- Allow annotate (`allow_annotate`, true/false, required): Allow annotate.
- New owner password (`new_owner_password`, text): New owner password.
- New user password (`new_user_password`, text): New user password.
- Password (`password`, text): Password.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "link": "example"
  }
}
```

### Pdf split

Splits a PDF, uploaded or from a public URL, by extracting a page range, into chunks of a set size, or by its bookmarks. Returns links to the new files.

**Inputs**

- Type (`type`, text): How to split the file. One of: `ExtractPages`, `SplitIntoChunks`, `SplitByBookmarks`. Default: `ExtractPages`.
- Extract range (`extract_range`, text): Page or pages range. Example: 2, 4-7, 9-*, last(3). Required for ExtractPages split type
- Pages in chunk (`pages_in_chunk`, number): Number of pages in one chunk. Optional. 1 - default number of pages. Used for SplitIntoChunks split type
- Chunks range (`chunks_range`, text): Pages range. Optional. Apply to the specified pages range. E.g. 3-8. Used for SplitIntoChunks split type
- Bookmark depth (`bookmark_depth`, number): Bookmark depth. Optional. Depth of bookmarks levels to track. 1 - default. Used for SplitByBookmarks split type
- Use bookmarks for file names (`use_bookmarks_for_file_names`, true/false): Use bookmarks as filenames. Optional. Shouldn't be "Yes" if Filename Prefix is specified. Used for SplitByBookmarks split type
- Filename prefix (`filename_prefix`, text): Filename Prefix. Optional. Output files will have this prefix followed by an index number for name. Won't take effect if UseBookmarksForFileNames is "true"
- Password (`password`, text): Password.
- File (`file`, text): File.
- File url (`file_url`, text): File url.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "links": []
  }
}
```

### Start process

Starts a document generation process by its ID with the data to fill its template, and returns links to the documents it produces.

**Inputs**

- Short user ID (`short_user_id`, text, required): Short user ID.
- Process (`process_id`, text, required): Process ID.
- Data (`data`, object, required): Data.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```
