How to Send Files by Email to SharePoint Online (Tutorial)

How to Send Files by Email to SharePoint Online (Tutorial)

Last Updated on November 16, 2023

Can you send files to SharePoint using email?

In this tutorial, I will show you a method you can use to send files to a modern SharePoint document library and how to set it up.

Let’s get started.

What do you need to send files by email to SharePoint?

First things first…

I’m sorry to say that the modern experience in SharePoint Online doesn’t have an incoming email feature.

That doesn’t mean though that it’s impossible. It simply means you have to set it up yourself.

For this, you will need two things:

  1. Create a shared mailbox for the document library
  2. Create a new Microsoft flow for importing attachments

Sign up for exclusive updates, tips, and strategies

    How to set up a SharePoint to receive files by email

    The first step here is to create the shared mailbox.

    Note: You will need the proper licenses and permissions to do the steps below.

    Step #1: Go to the Exchange admin center

    For this, you need to get to the Microsoft 365 admin center first.

    On any Microsoft 365 page, click the app drawer and select the admin button:

    Admin button from the app launcher

    From there, expand the menu on the left panel.

    Click the Exchange button:

    select exchange from the menu

    Step #2: Add a shared mailbox

    Welcome to the Exchange admin center.

    Expand the teams and groups menu on the left panel and click the shared mailboxes option:

    Go to the shared mailboxes settings

    Everything is straightforward from here.

    Click the add a shared mailbox button:

    Create a new shared mailbox

    This will open a panel where you can add a shared mailbox.

    Enter the name of the mailbox and Exchange will automatically fill out the email field (you can change it if you want).

    Add a shared mailbox

    Make sure that the email address is not in use, or you will see a red error telling you that the email address isn’t available.

    Related: How to Add a Shared Mailbox in Outlook 365 (Easy Guide)

    Step #3: Delegate the full access (optional)

    If you’re a global admin, this isn’t necessary anymore. But you can check if you have full access to the mailbox.

    After creating a shared mailbox, it will now appear in the mailboxes list in Exchange — click on it:

    Click the name of the mailbox

    A panel will open up with more info on the mailbox.

    Go to the delegation tab and click the edit button on the read and manage section:

    read and manage full access settings

    You will see here all the users will have full access permission to the mailbox.

    If you didn’t see your name, you can add it by simply clicking the +add members button and adding yourself:

    add members with full access permission

    Related: SharePoint Online and Outlook Integration: How It Works

    Step #4: Create a new automated cloud flow

    The first three steps are for item #1 — creating a shared mailbox. Now it’s time for item #2, creating the Microsoft flow.

    Get to Power Automate first:

    open power automate

    You can now create a Power Automate flow.

    Click the create tab from the left panel and click the automated cloud flow button:

    Create an automated cloud flow

    Step #5: Configure the Microsoft Flow

    You have the option of giving the Microsoft flow a name, or you can let the system handle it.

    The important part is searching for the trigger: when a new email arrives in a shared mailbox.

    Click on it from the options and click the create button:

    search for the when a new email arrives in a shared mailbox trigger

    On the next page, show the advanced options of the trigger.

    Do the following:

    1. Supply the original mailbox address (the newly created shared mailbox address)
    2. Select the folder path (can be the inbox)
    3. Select yes for the only with attachments
    4. Select yet for the include attachments
    5. Click the +new step button
    support mailbox address

    On the operation box, search for the create file operation.

    Click on it from the actions section:

    select create file action

    Don’t worry, we’re almost done now.

    Complete the following:

    1. Site address (select the destination site)
    2. Folder path (select the SharePoint Online document library)
    3. File name (select attachments name from the parameters list)
    4. File content (select attachments content from the parameters list)

    Note: After selecting the attachments name parameter, you may notice a new field above the box. Just ignore it.

    complete the create file box

    After you finish setting up the box above, click the save button below that box.

    Since the flow is an automated one, it will automatically run when the trigger is hit.

    Related: How to Forward a Folder of Emails in Outlook (Using Rules)

    Step #6: Test the flow

    As with everything, it’s important that you test it out first to know if the flow worked properly or not.

    This is the mail content we’re sending:

    email content

    Depending on how large the file is, you may have to wait for a few minutes.

    And boom, here is our test file on the SharePoint document library:

    test doc in the sharepoint document library

    Related: Modern SharePoint Document Management System Guide Tutorial

    Alternatives for uploading files to SharePoint Online

    Using email is only one way to send a document or a file to SharePoint Online.

    In fact, I will say it’s one of the most tedious ones since there are several easier options.

    Here are some of them:

    1. Through the SharePoint Online interface: This is the most common method. You can navigate to the specific document library in SharePoint Online and select the “Upload” button to choose a file from your computer to upload.
    2. Syncing with OneDrive: If you have the OneDrive sync client installed on your computer, you can sync your SharePoint Online libraries with a folder on your computer. Any files you add to this folder will automatically be uploaded to SharePoint Online.
    3. Using Microsoft Teams: If your SharePoint Online site is linked to a Microsoft Teams team, you can upload files directly from Teams. These files will then be accessible in both Teams and SharePoint Online.
    4. Using the SharePoint mobile app: If you have the SharePoint mobile app installed on your phone, you can use it to upload files directly to SharePoint Online.
    5. Using PowerShell or other scripting tools: If you’re comfortable with scripting and you need to upload many files at once or automate file uploads, you can use PowerShell or other scripting tools with the SharePoint Online Management Shell or the SharePoint Online Client Object Model.

    Got lost along the way? If you’ve got questions, simply drop them in the comments.

    For business inquiries and concerns, kindly fill out the form here and I’ll get back to you asap.

    About Ryan Clark

    As the Modern Workplace Architect at Mr. SharePoint, I help companies of all sizes better leverage Modern Workplace and Digital Process Automation investments. I am also a Microsoft Most Valuable Professional (MVP) for SharePoint and Microsoft 365.

    Subscribe
    Notify of
    guest
    1 Comment
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments

    Brent Ferris
    Brent Ferris
    4 months ago

    This looks fantastic. One question. What happens to files that are emailed with the exact same name? does it become filename(1).xlsx or overwrite the file with the same name? (The latter is what i would like for my use case)

    1
    0
    Would love your thoughts, please comment.x
    ()
    x
    Scroll to Top