> For the complete documentation index, see [llms.txt](https://docs.powerdevbox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powerdevbox.com/autoreview/autoreview-power-platform-connector/file-v1.md).

# File (v1)

### Inputs (required)

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2FongeRfDma0JU9aiQOpVv%2Fimage.png?alt=media&amp;token=c85751e8-b8f0-473c-a05b-eef6ee1df830" alt="" width="563"><figcaption></figcaption></figure>

#### Display Name

Display name of the flow

#### Flow ID

Unique ID of the flow, recommend using Resource id or workflowid

#### Owner

Flow owner/maker

#### Environment

Environment name

#### Definition

Flow definition/clientData

### Inputs Optional

AutoReview allows configuration of the review metrics,  if left blank the review will follow the default values.

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2F2qeAlR6OjedZhFOLjtUB%2Fimage.png?alt=media&amp;token=d5005201-fe95-4dc1-9202-c0aa501aec9f" alt="" width="491"><figcaption></figcaption></figure>

* [Complexity](/autoreview/configs/complexity.md)
* [Naming Convention](/autoreview/configs/naming-convention.md)
* [Ratings](/autoreview/configs/ratings.md)
* [Scoring](/autoreview/configs/scoring.md)

#### Complexity

New complexity items can be added with the 'Add new item' button. Though we recommend using the text mode (small pen in top right corner).

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2FB4pjrGgcm0KHBjPdkiWy%2Fimage.png?alt=media&amp;token=a7c72d2a-111e-43a2-bd28-7ba172ce0869" alt="" width="185"><figcaption><p>Use text mode for easier editing</p></figcaption></figure>

The [complexity json](/autoreview/configs/complexity/complexity-template.md) object can then be edited in a source code editor (like Visual Studio Code or Notepad++) and then pasted in its entirety into the aComplexityTemplate input. With the reference inputted to the Reference Complexity.

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2FRIUrmsDKWAX8anLfWzfp%2Fimage.png?alt=media&amp;token=6da1ee4a-28b9-4600-9b4b-b2108bb8ece6" alt="" width="439"><figcaption></figcaption></figure>

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2FSMv3A3y4Gz06rrTXXFVb%2Fimage.png?alt=media&amp;token=eb05a9c9-95fe-462e-8549-f5b9c8e3aaf5" alt="" width="433"><figcaption></figcaption></figure>

#### Naming Convention

The [naming convention json](/autoreview/configs/naming-convention/naming-template.md) has to be placed in 3 inputs.

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2F39lZ9Q1MVsYuLVtL6UQb%2Fimage.png?alt=media&amp;token=56e58292-b11a-401f-a326-38f13fbe1c18" alt="" width="442"><figcaption></figcaption></figure>

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2FoOWDNvl37STMu5KkftXB%2Fimage.png?alt=media&amp;token=232fc7ec-c7d6-4fc2-9ead-abd7b252425d" alt="" width="435"><figcaption></figcaption></figure>

* Naming Reference - sReference
* Naming Char - char
* data - data array

#### Ratings

Each [rating key](/autoreview/configs/ratings/ratings-template.md) needs to be entered into the relevant inputs.

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2F1RlAZA2joXrU7Fu4WmgJ%2Fimage.png?alt=media&amp;token=1ae400bd-a991-468a-b935-1ff1f69e95f6" alt="" width="563"><figcaption></figcaption></figure>

#### Scoring

The [scoring json](/autoreview/configs/scoring/scoring-template.md) follows same pattern as complexity, with the reference input separately from the aScoringTemplate array.

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2F0JFGi9AxeKSFadRdQZWc%2Fimage.png?alt=media&amp;token=606258fc-1574-4b83-8d1c-838bd4d5e00f" alt="" width="444"><figcaption></figcaption></figure>

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2FUqF4SHVaRQKCxjOOTWRc%2Fimage.png?alt=media&amp;token=989fef27-af58-4b83-a143-38e796bc9448" alt="" width="437"><figcaption></figcaption></figure>

### Outputs

The File api returns the following

* File
* Data

#### File

The file key returns a HTML pile that can be used to create a file. There are 4 different file types:

* [Review](/autoreview/files/review.md)
* [Report](/autoreview/files/report.md)\*
* [Diagram](/autoreview/files/diagram.md)\*
* [Exceptions](/autoreview/files/exceptions.md)\*\*

*\*coming soon \*\*coming not so soon*

#### Data

Data is a stringified json and once parsed returns different values depending on the file selected.

#### Review and Report

| Key          | Description                                  | Example |
| ------------ | -------------------------------------------- | ------- |
| Complexity\* | Complexity score                             | 100     |
| Actions      | Count of all actions                         | 40      |
| Variables    | Count of variables                           | 4       |
| Exceptions   | Count of exception actions (runAfter Failed) | 2       |
| Connections  | Count of connections                         | 2       |
| Premium      | Uses premium actions                         | true    |

*\*Review only*

#### **Diagram**

Returns the [nomnoml](https://www.nomnoml.com/#) file. This file is similar to mermaid and creates a text file that is rendered as a diagram. The text can be pasted into nomnoml site or a site using the library.

```
#fillArrows: true
#lineWidth: 2
#fill:#569AE5
#background: white
#acyclicer: greedy
#ranker: tight-tree
#.data: visual=database fill=#EBDAF9
#.trigger: visual=roundrect fill=#569AE5
#.if: visual=rhomb fill=#2596be
#.switch: visual=ellipse fill=#2596be
#.scope: visual=frame fill=#808080
#.foreach: visual=transceiver fill=#00C1A0
#.until: visual=sender fill=#00C1A0
#.var: visual=input fill=#9925be
#.terminate: visual=receiver fill=#cc4747
#.var: visual=input fill=#EBDAF9

[<trigger> *Recurrence]->[HTTP]
[<foreach>Apply_to_each]--:>[<terminate>Terminate]
[HTTP]->[<data>Parse_JSON]
[<data>Parse_JSON]->[<foreach>Apply_to_each]
```

<figure><img src="https://587669603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lWqApvE0FgYB0xwkqLD%2Fuploads%2F1KuTg1U5UEUbaaUf19XT%2Fimage.png?alt=media&amp;token=a6c072c8-134f-4b4f-b120-568e6aadb18b" alt=""><figcaption></figcaption></figure>

***

**Next Steps - Files**

{% content-ref url="/pages/ZnzdkL0SHmklyEQvCxcP" %}
[Files](/autoreview/files.md)
{% endcontent-ref %}
