> 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://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-0a1f18dcca9c9fb3ec35ae3b1b0874f54373cdcc%2Fimage%20(86).png?alt=media" 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://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-78896d7157837a8c19a9a7bd775e8ecfc132fb72%2Fimage%20(87).png?alt=media" 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://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-af7e75373c6ed1ef09c53d7737be32832b906929%2Fimage%20(150).png?alt=media" 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://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-0cb45f7702249e94f79bc34bec849dd0d12e3731%2Fimage%20(89).png?alt=media" alt="" width="439"><figcaption></figcaption></figure>

<figure><img src="https://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-92bd2cc39e96435ca8c465c0658003ec0699e574%2Fimage%20(92).png?alt=media" 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://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-d4399c9068a976157972f0d6ca01203cfa915210%2Fimage%20(91).png?alt=media" alt="" width="442"><figcaption></figcaption></figure>

<figure><img src="https://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-46b99613e23e575ac012293f677d16f910dd9871%2Fimage%20(93).png?alt=media" 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://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-f1af4888fae767f1a2b7958b77f0bd81135cd216%2Fimage%20(151).png?alt=media" 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://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-92045a55a4d1d199772a47d84ffb803f06defd42%2Fimage%20(90).png?alt=media" alt="" width="444"><figcaption></figcaption></figure>

<figure><img src="https://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-73d18f1be70ef2da192dc8e08f534e1e3622911a%2Fimage%20(94).png?alt=media" 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://615225135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQ78yGt6X6zz3qONecCy%2Fuploads%2Fgit-blob-5e271de5f3244edea2c799bbbcf74858ef266523%2Fimage%20(157).png?alt=media" alt=""><figcaption></figcaption></figure>

***

**Next Steps - Files**

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