Cloud-Only is the preferred mode of operation, where Microsoft 365 addresses the entire spectrum. Discover how I targeted the challenge of the legacy scanner that had saved its files to a local file share but didn’t speak cloud.
I have earlier published another post supporting your move from legacy on-premises solutions to cloud: Simon does… Automatic file upload from legacy server to Microsoft 365 (skotheimsvik.no)
Table of Contents
Microsoft 365 can handle all needs related to the modern workplace. This should be a no-brainer for start-up companies. Businesses with a technological history can face some challenges when migrating to the cloud.
One of these challenges is the legacy scanner used to scan to a shared folder on the legacy file server. For many departments a vital asset in their day to day operations.
Files are migrated from the file server to SharePoint and Teams sites making them easy and secure accessible for the information workers regardless of their location. While modern scanners can scan directly to SharePoint, legacy scanners might lack the feature of communicating securely with SharePoint.
In some circumstances the correct option is to replace the scanner. This might represent an extra negative cost added to the Microsoft 365 project. That’s why I did come up with the following solution for scanning to SharePoint site by use of the available communication protocols in legacy scanners. The end user will experience this as scanning directly to a Teams folder.
Rigging the solution
I want to use standard technology available from Microsoft that does not trigger any additional cost.
Since most scanners can talk SMTP, I will arrange a shared mailbox in the Microsoft 365 solution. This will not require any license cost.
Navigate to Exchange admin center and create the shared mailbox.
Since this mailbox will be an intermediary between scanner and user, I will hide it from the global address list (GAL).
The user who will run the Power Automate flow must have access to the mailbox.
Teams folder for files
Next up I will create a folder in a Teams channel where I want the files from the scanner to be saved.
Now it is time to add a flow in Power Automate that will act on new emails in the shared mailbox and move attachments to the folder in Teams. This will be done by one of the power users at the department (the user that got access to the shared mailbox).
Log in to the https://make.powerautomate.com/ portal and create a new flow. This flow should use the trigger named “When a new email arrives in a shared mailbox”.
Search for the shared mailbox and select it.
Make sure the Inbox is selected as folder and move on to add a “New step”.
Search for the “Apply to each” action and select it.
Add “Attachments” as the output from previous step.
Add an action to the flow.
Pick the “Create file” action for SharePoint.
Get the the SharePoint Site Address
Add this address to the flow and click on the folder icon to pick the correct folder. Click through to the correct path, in this example: “Shared Documents/Market/Scan to Folder”.
Add the “Attachment Name” and “Attachment Content” variables from the Attachment file before adding a new action to the flow.
Search for the “Delete email” action and add this to the flow.
Pick the “Message Id” variable and enter/search for the shared mailbox where the email should be deleted from. Save the flow.
This gave me a working routine.
CoPilot Makes This Easier
When reviewing this routine at a later point in time, I found that Copilot could make the same automation flow with two simple prompts:
The output is pretty much identical, but it saved me some time!
Test the routine
The routine can now be tested by sending an e-mail with attachment to the shared folder.
After a cloud-minute, the attachment should be available in the folder and the user can take action and move it to a proper permanent location.
Hack the scanner
Now that the routine is verified and tested, it’s time to hack the scanner for easy operations. Most scanners have some kind of address book where we will add the shared mailbox address . Most scanner have a web GUI where this can be administered.
By adding the e-mail address as a shortcut it will be easy for the users to add their documents to the document feeder of the scanner.
Exclusive on-premises operation
As mentioned earlier, the migration to the Microsoft 365 cloud allows the end users to operate and access the files in SharePoint and Teams sites regardless of their location. All of the mentioned configuration can also be performed from wherever, including the scanner hack.
By doing such adoption of technologies we can bridge the gaps between legacy and modern. But do remember – someone needs to be exclusively available on-premises to operate the scanner and feed it with paper. We are moving towards a cloud-based world, but the paperless office is not yet a reality, like the paperless toilets are not yet a reality – for some.