# Power Automate

### Usage <a href="#sample-usage" id="sample-usage"></a>

Use Power Automate Connector for Documentero to generate documents.

Connector documentation page: <https://learn.microsoft.com/en-us/connectors/documentero/>

### Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=XjuGnqxrXSA>" %}

{% embed url="<https://youtu.be/xmBHKmJMrJk>" %}

### Sample Usage <a href="#sample-usage" id="sample-usage"></a>

* Create or upload template(s) (.docx/.xlsx) to Documentero ([https://app.documentero.com](https://app.documentero.com/))
* \[Optional] Once the template is added, decide on the output format and output file name on the template overview page in Documentero
* Use the "Generate Document - Word Excel PDF" action if you want to pass the document to a different service (e.g., OneDrive/Google Drive/Outlook) or use "Generate and Email Document - Word Excel PDF" to generate the document and email it via the Documentero service
* Once the connector is using the correct connection, Documentero templates should populate in the dropdown list ("Document Template")
* Select the template that you want to use for document generation. After selection, all template fields should appear ready for mapping
* Provide/map values for all desired fields
* Test your flow

### Supported Operations <a href="#supported-operations" id="supported-operations"></a>

The connector supports these operations:

* `Generate Document - Word Excel PDF`: Populate an .xlsx or .docx template and generate a document
* `Generate and Email Document - Word Excel PDF`: Populate an .xlsx or .docx template and send the generated document as an email attachment

### Response Fields <a href="#response-fields" id="response-fields"></a>

The connector returns the following fields:

* `data.fileName`: Name of the generated file
* `data.fileContent`: Base64-encoded content of the generated file
* `data.fileExtension`: File extension of the generated document
* `data.contentType`: MIME type of the generated file

<br>
