# Oomplo

Oomplo turns Word templates into PDF and Word documents filled with your
data. With this connector a flow creates a contract, an invoice or a
letter from any data it has (a SharePoint item, a form response, a row
of Excel) and saves or sends the file, or makes a series with one
document per row.

## Publisher: Oomplo

## Prerequisites

- An Oomplo server reachable over HTTPS from Power Automate (directly or
  through a reverse proxy with your own access control).
- A published template in Oomplo and an API key (**Oomplo → API keys**).

## Supported Operations

### Create a document from a template

Fills a published template with the data and returns the PDF (or the
filled Word document) as file content, with a file name, the number of
pages and warnings. Options: the format, what to do with missing values,
a kept version.

### Check data for a template

Every missing value and every value of the wrong kind, without making a
document.

### Get the data a template needs

The fields and arrays of a template, example data and a JSON Schema.

### Start a series of documents

One document per row of a JSON array; the result is a ZIP with a file
per row or one PDF.

### Get the state of a series

Whether the series is running, done or failed, and how many documents are
made.

### Get the result of a series

The ZIP or the PDF of a finished series.

## Obtaining Credentials

In Oomplo, an administrator opens **API keys** and creates a key. When you
create a connection, enter the host name of your Oomplo server (without
`https://`) and `Bearer ` followed by the key.

## Getting Started

1. *Get the data a template needs* shows the fields of a template and an
   example.
2. Add *Create a document from a template*, choose the template by its ID
   or API name and give the data as JSON, e.g. the body of a previous
   step.
3. Use *File Content* in *SharePoint – Create file* (name ending in
   `.pdf`) or as an e-mail attachment.

For many documents: *Start a series of documents*, then a *Do until* loop
with *Get the state of a series* until the state is not `running`, then
*Get the result of a series*.

## Known Issues and Limitations

- The connector calls your own Oomplo server; it must be reachable from the
  Power Platform region of your environment (or through an on-premises
  data gateway).
- A series has at most 1000 rows; its result is kept for 24 hours by
  default.
- A missing value stops *Create a document from a template* with a list
  of every missing value, unless *Missing Values* is `empty`.

## Deployment Instructions

Import `apiDefinition.swagger.json` and `apiProperties.json` as a custom
connector (Power Platform CLI: `paconn create --api-def
apiDefinition.swagger.json --api-prop apiProperties.json --icon
icon.png`), then create a connection with your server and API key.
