Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Faculty, staff, and students can utilize Power Automate in order to automatically save incoming email attachments to sent from their scanner into their SharePoint site. Power Automate is a Microsoft application just like exists in the same Microsoft ecosystem as SharePoint and OneDrive.

Note

This process cannot be used with HIPPA data. Be cautious when using this method with other PII.

What will this automation do?

With Power Automate, every automation is completely customizable. Following this guide , and using the ITS-provided template you will create an automation that:

  1. Saves the attachment of an incoming email scan from your department printer/scanner unit into a SharePoint site as a PDF.

  2. Deletes the email from your Inbox (this step is not required and can be removed).

...

  1. Conduct a scan from your networked printer/scanner and send it to your UConn email address as you normally would. This will give you information you will use in a later step.

  2. To use the template for this automation, click on this following file to download it:

    View file
    nameUConnSaveAttachmenttoSharePoint.zip
    . Do not unzip this file.

  3. Navigate to s.uconn.edu/powerautomate

  4. Sign in with your Email address and NetID password if asked.

  5. Click on My flows and then Import. Choose Import Package and upload the .zip file that you downloaded in Step 2.

    Image Removed
  6. Be sure that Power Automate recognizes your accounts by displaying your email address for the two flow connectors.

    Image Removed

Click Continue.

  1. Image Added
  2. Once the file uploads, click on the two Select during import links in the Related Resources box. Choose your own email address.

    Image Added
  3. Click on Import.

  4. Once the import has finished, at the top of the page you will see the confirmation. Click on the Open flow link to view the automation.

    Image Added
  5. You now need to complete a couple edits to the automation.

    Image Added

Trigger

Tip

You must be specific in defining your trigger so that the automation only runs on the intended emails. If there is concern, you may remove the Deletion action that follows.

The top box on this new page is the “Trigger”. This is the action that triggers the automation. For this guide, the trigger is receiving a specific email in your personal inbox.

  1. Click on

...

  1. the When a new email arrives box to expand it.

  2. Although the first field already says “Inbox”, you need to confirm it is connecting to your inbox (because you imported this flow from a template) by re-selecting Inbox.

    1. Click on the folder icon to open a popup menu. Then click on the text that says Inbox.

      Image Added
  3. Next, click on Show advanced options. The following steps are important.

  4. This is where you will need to

...

  1. be specific so that this automation only triggers on emails from your network scanner.

    1. Using the information you gathered from

...

    1. the first step on this guide:

    2. In the From field, enter the address that your

...

    1. scanner

...

    1. sends

...

    1. emails from.

...

    1. The Include Attachments field

...

    1. needs to be Yes.

    2. In the Subject filter field, enter the Subject that your printer/scanner generates. See Note below.

...

    1. The Importance field needs to be Any.

    2. The Only with Attachments field

...

    1. needs to be Yes.

    2. Pictured below is an example setup using the scanner in the Technology Support Center:

      Image Modified

You will likely want to use a unique Subject for this emailautomation. The Subject line will dictate whether your a scan from the scanner will follow this automation or not. The default Subject line from the printer scanner will likely resemble: “Scanned from a Xerox Multifunction Printer”.

Depending on which process you perform more often, you will need to choose decide whether the Printer’s scanner’s default Subject should trigger the automation or notif a non-standard subject should. If you’re more likely to need this automation, then the default Subject should trigger the automation. Then when it comes time to scan something that should not go through this automation, you will change the Subject line to anything other than the default.
If you’re more likely to not need the automation, then the opposite is true.

Action 1

...

The next main box is

...

In the Create file box,

...

the first Action that the automation takes. This Action requires some configuring from you.

  1. Click on the text Apply to each Attachment on the email to expand the box. Then click on Create file to expand that box.

  2. Click on the Site Address field to see a list of your SharePoint sites

...

  1. .
    Note: If you do not see your site, you may open a new browser tab and navigate to s.uconn.edu/sharepoint to visit your SharePoint site there. Then simply copy the URL from the address bar and paste it into

...

  1. this field.

  2. Once you have the SharePoint site field filled in, you

...

  1. need to choose the folder in which you want the

...

  1. scans to be deposited.
    This folder will be the repository for all of your scans.

...

    1. Like you did with Inbox above, click on the folder icon and then choose the arrow next to Shared Documents to open that location.

...

    1. Clicking on the folder name

...

    1. will select that folder while clicking on the arrow will open the folder.

      Image Added
    2. The next two fields, File Name and File Content should be left as-is.

Tip

The scans need this crafted name to ensure the automation runs correctly. The resulting PDFs can be renamed once they appear in SharePoint.

Expand
titleIf you

...

he File Name field contains a function that pulls the name of the email attachment and keeps that as the file name.

...

would like to learn more about the File Name and File Content fields, click here:
Info

The following steps will show you how to recreate what was included in the template.

  1. The File Name field allows you to set the file name of the incoming scan. If you set a static name, each new scan will overwrite the last.

...

  1. To avoid this

...

  1. , you need a way to assign a unique file name to each new scan.

    1. To achieve this, the template you downloaded appends a timestamp to the filename: “Scan-[time of scan][random number].

...

    1. pdf”

      1. The

...

      1. random number will be the unique identifier that prevents the over-writing of files.

      2. Click on the File Name field and clear it out. When you click on the field, a popup window will appear: click on the Expression tab of this window.

        Image Modified
      3. Copy and

...

      1. paste the following text into the textbox: formatDateTime(addHours(utcNow(), -4),'yyyy-MM-ddTHH:mm:ssZ') Then click Update.

        Image Modified
      2. The dynamic text is now in the field

...

      1. .

      2. Now you will need to add the safety net. You will use a pseudo-random number generator for this.

        1. Click on the File Name field again, a popup window will appear. Click on the Expression tab of this window.

        2. Type in rand(0,999). This will append a random number between 0 and 999 to the file name. You may change this range if desired.

        3. This is necessary due to how Microsoft handles the timecode. The time represented in the file name is not when the scan is created, but rather when Microsoft runs the automation. From testing, it appears that Microsoft handles the automations either in batches or handles many of them in less than a second. Either way, the result is multiple scans may have the same value in the seconds-field, and therefore multiple scans are created with the same filename and the next automations in that “batch” will fail to run.

          Image Added
      3. You need to add .pdf to the end of the name to maintain file integrity.

...

      1. Place your cursor at the front to add some static text if desired. Adding “Scan” will help you in using the search to find these files.
        You may need to use your arrow keys to get the cursor to the front of the box.

        Image Added
  1. Leave the File Content field as it is.

...

  1. Changing this may corrupt the resulting file.

    1. If you need to add the dynamic text, click on the field and search in Dynamic content for “Attachments Content”

      Image Added
  2. Final result:

    Image Added

Action 2

Info

You can remove this Action if you do not want the email to be automatically deleted.

The

...

email from your

...

scanner will be automatically deleted at the end of the automation.

  1. Leave this box as is unless you would like to remove this action. If you decide to keep this action, do not alter the settings.

    1. If you want to remove this action, click on the ellipsis and then choose Delete to remove this action.

      Image Modified

Save and test the automation

  1. Click Save to save this automation. It will take a few moments to save.

  2. You will receive the following message when it has completed: Your flow is ready to go. We recommend you test it.

  3. Click on the arrow at the top to leave the Editor.

  4. Click Turn on in the top menu bar to enable the automation. The automation will run until it is disabled, or you leave the university.

    Image Added
  5. Go to your scanner and conduct a scan that will meet your Trigger criteria.

  6. Wait a few minutes for the automation to complete. You may click the refresh button periodically to see the results of the automation.

    Image Added
Info

If you have Outlook open, you will see the email from the scanner. This email will disappear when the automation finishes (if you kept the Deletion Action in the automation).

Optional: Set Computer to Automatically Download Scans

These steps are assuming that this folder is simply the repository of the scans, and the scans will be moved from this folder and distributed to other folders.

Using a funciton function of the OneDrive App, you can set your computer to automatically download this SharePoint file scan to your computer. This The only purpose of following these steps is it may save you a few couple seconds for each scan.

  1. Open File Explorer (Windows) or Finder (macOS).

  2. Click on [Your Name] - University of Connecticut in the lefthand menu to open your OneDrive.

  3. Open your SharePoint files and navigate to the folder that is receiving the scans but do not open the folder.

  4. Right-click on the folder and choose Always keep on this device.

...

Filter by label (Content by label)
showLabelsfalse
max5
showSpacefalse
cqllabel = "sharepoint"