Build the entity

  1. Sign in to powerapps.com.

  2. If the left navigation bar doesn't appear by default, click or tap the icon with three horizontal lines in the upper-left corner.

    Open left navigation bar

  3. In the left navigation bar, click or tap Manage, and then click or tap Entities.

    Manage entities

  4. If prompted, click or tap Create my database.

    Create database

  5. Near the upper-right corner, click or tap New entity.

    Create entity

    If your browser window isn't maximized, this button might appear in a different place.

  6. Under Entity name, specify a name that doesn't contain spaces and that no other entity in your database has.

    To follow this example exactly, specify ReviewDropboxFiles.

    Specify entity name

  7. Under Display name, specify a friendly name.

    Specify display name

  8. Click or tap Next.

    Next button

Add fields to the entity

  1. Near the upper-right corner, click or tap Add field.

    Add field

  2. In the blank row that appears at the bottom of the list of fields, set the properties of an Approver field. (As you set these properties, you can switch to the next column by pressing Tab.)

    • In the Display Name column, type Approver.

    • In the Name column, type ApproverEmail.

    • In the Type column, click or tap the Email option.

    • In the Required column, select the checkbox.

      Approver field

  3. In the next row, set the properties of a Status field:

    • In the Display Name column, type Status.

    • In the Name column, type Status.

    • In the Type column, click or tap the Text option.

    • In the Properties column, leave the default value.

    • In the Required column, select the checkbox.

      Status field

  4. In the next row, set the properties of a FileID field:

    • In the Display Name column, type File identifier.

    • In the Name column, type FileID.

    • In the Type column, click or tap the Text option.

    • In the Properties column, leave the default value.

    • In the Unique column, select the checkbox.

    • In the Required column, select the checkbox.

      FileID field

  5. Near the right edge, click or tap the ellipsis (...) for the FileID field, and then click or tap Set as Title field.

    Set title field

  6. Near the lower-left corner, click or tap Create.

    Create an entity

  7. (optional) When the list of entities reappears, maximize your browser window if it isn't already maximized, and then click or tap the Type column header. The list is sorted with the custom entities, such as the one you just created, appearing at the top.

Sign in and create a flow

  1. Open the Microsoft Flow portal.

  2. Maximize your browser window if it isn't already maximized, and then click or tap Sign in near the upper-right corner.

    Sign-in button for Microsoft Flow

  3. In the top right menu you select the environment that you created the database in powerapps.com.

    Note: if you do not select the same environment then you will not see your entity.

  4. Near the upper-left corner, click or tap My flows.

    My flows button

  5. Near the upper-right corner, click or tap Create new flow.

    Create new flow button

Start when a file is added

  1. In the box that contains Search for more triggers, type or paste Dropbox, and then click or tap Dropbox - when a file is created.

    Create trigger

  2. Under Folder, click or tap the folder icon, and then browse to the folder where files will be added.

    Choose folder

Add data to the entity

  1. Click or tap New step, and then click or tap Add an action.

    Add an action

  2. In the box that contains Search for more actions, type or paste Common Data Service, and then click or tap Common Data Service - Create object.

    Create an object in the Common Data Service

  3. Under The entity, type or paste Review, and then click or tap Review Dropbox files.

    Choose the entity

  4. Under Title, click or tap in the box, and then click or tap File name in the list of parameter tokens to add that token to the field.

    Add File name token

  5. Under Approver, type or paste the email address of the person who will review the files.

    Note: To make testing the flow easier, specify your own address. You can change it later, when the flow is ready for actual use.

    Add approver

  6. Under Status, type or paste Pending.

    Add default status

  7. Under File Identifier, click or tap in the box, and then click or tap File identifier in the list of parameter tokens to add that token to the field.

    Add File identifier token

Check whether the file has been reviewed

  1. Under the Create object action, click or tap New step, click or tap More, and then click or tap Add a do until.

    Add do until

  2. In the upper-left corner of the Do until action, click or tap in the box that contains Choose a value.

    Choose a value

    Note: If your browser window isn't maximized, click or tap in the upper box that contains Choose a value.

  3. Under Outputs from Create object, click or tap Status to add that parameter token to the field.

    Add Status token

  4. Open the list near the center of the Do until action, and then click or tap is not equal to.

    Specify is not equal to

  5. In the upper-right corner of the Do until action, type or paste Pending in the box that contains Choose a value.

    Specify status to watch

    Note: If your browser window isn't maximized, click or tap in the lower box that contains Choose a value.

  6. Near the bottom of the Do until action, click or tap Add an action.

    Add action inside a do until

  7. In the box that contains Search for more actions, type Common, and then click or tap Common Data Service - Get object.

    Get an object

  8. Under The namespace, click or tap your database.

  9. Under The entity, type or paste Review, and then click or tap Review Dropbox files.

    Choose entity

  10. Under Object id, click or tap in the box, and then click or tap the File identifier parameter token to add it to the field.

    Add object identifier

Check whether the item has been approved

  1. Under the Do-Until action, click or tap New step, and then click or tap Add a condition.

    Add condition

  2. In the upper-left corner of the condition, click or tap in the box that contains Choose a value.

    Upper left corner of condition

    Note: If your browser window isn't maximized, click or tap in the upper box that contains Choose a value.

  3. Under Outputs from Get object, click or tap the Status parameter token to add it to the field.

    Add status to condition

  4. In the upper-right corner of the condition, type or paste Approved in the box that contains Choose a value.

    Verify whether the status is set to approved

    Note: If your browser window isn't maximized, type or paste Approved in the lower box that contains Choose a value.

Send notification mail

  1. Under If yes, do nothing, click or tap Add an action.

    If yes, add an action

  2. In the box that contains Search for more actions, type or paste send mail, and then click or tap Office 365 Outlook - Send an email.

    If yes, send mail

  3. Under To, type or paste the address of the person whom you want to notify when an item is accepted.

    Note: To make testing the flow easier, specify your own address. You can change it when the flow is ready for actual use.

    Approval recipient

  4. Under Subject, click or tap in the box, and then click or tap the File name parameter token to add it to the field.

    Specify the file name as the email subject

  5. Under Body, type or paste The item has been approved.

    Body of approval mail

  6. Under If no, do nothing, repeat steps 1-5 in this procedure except specify the body of the email message as The item has been rejected.

    Body of rejection mail

Delete rejected files

  1. Under the fields for the rejection mail, click or tap Add an action.

    Add delete action

  2. In the box that contains Search for more actions, type or paste Dropbox, and then click or tap Dropbox - Delete file.

    Delete file from Dropbox

  3. Under File, click or tap in the box, and then click or tap the File identifier token parameter to add it to the field.

    Identify file to delete

Save the flow

  1. At the top of the screen, type or paste a name for the flow that you're creating, and then click or tap Create Flow.

    Save flow

  2. Click or tap Close and then click or tap Done.

  3. In Dropbox, add at least two files to the folder that you specified: one to test approval and one to test rejection.

Build the app

  1. Sign in to powerapps.com, and then click or tap New app near the bottom of the left navigation bar.

    Create an app in a browser

  2. In the dialog box that appears, click or tap the option to open either PowerApps Studio for Windows or PowerApps Studio for the web.

  3. If you opened PowerApps Studio for Windows, click or tap New in the left navigation bar.

  4. Under Create an app from your data, click or tap Phone layout in the Common Data Service tile.

    Create app

  5. In the Search box, type or paste Review.

    Search for an entity

  6. Under Choose an entity, click or tap Review Dropbox Files.

    Choose an entity

  7. Near the lower-right corner, click or tap Connect.

    Connect button

  8. If the opening screen of intro tour appears, take the tour to get familiar with PowerApps (or click or tap Skip).

    Intro tour

    You can always take the tour later by clicking or tapping the question-mark icon near the upper-left corner and then clicking or tapping Take the intro tour.

  9. (optional) Near the bottom of the screen, drag the slider to increase the zoom so the app is easier to see.

    Zoom control

Customize the app

  1. In the right navigation bar, click or tap the layout that includes a header and a description.

    Connect button

  2. On the BrowseScreen, click or tap just under the search bar to select the larger text-box control.

    Select header

  3. In the right-hand pane, open the lower list by clicking or tapping its down arrow.

    Open dropdown

  4. In the lower list, click or tap Title so show the file name of the added files.

    Set heading data

  5. In the right-hand pane, open the upper list, and then click or tap Status to show the status of each file.

    Set body data

Test the overall solution

  1. In PowerApps, open Preview mode by clicking or tapping the play button near the upper-left corner.

    Open Preview mode

  2. For the first file in the list, click or tap the arrow to show details about that file.

    Open Details screen

  3. In the upper-right corner, click or tap the pencil icon to change details about the file.

    Open Edit screen

  4. In the Status box, type or paste Approved.

    Approve a file

  5. In the upper-right corner, click or tap the checkmark icon to save your changes and return to the details screen.

    Save changes

    In a few minutes, you'll receive email stating that the file was approved.

  6. In the upper-right corner, click or tap the back button to return to the browse screen.

    Return to browse screen

  7. For the other file in the list, click or tap the arrow to show details about that file.

    Open Details screen

  8. In the upper-right corner, click or tap the pencil icon to change details about the file.

    Open Edit screen

  9. In the Status box, type or paste Rejected (or anything except Approved, including Aproved or Approoved).

    Reject file

  10. In the upper-right corner, click or tap the checkmark icon to save your changes and return to the details screen.

    Save changes

    In a few minutes, you'll receive email stating that the file was rejected, and the file will be deleted from Dropbox.