Step-by-Step Guide to Creating a Flow from Scratch Using Power Automate

Today, we will demonstrate how to save email attachments from different sources into specific SharePoint folders. Here’s the flow chart for creating a flow from scratch.

Flow Chart for Creating Flow from Scratch
Flow Chart for Creating Flow from Scratch

Create a New Flow

  • On the Power Automate home page, click the Create button at the top-left corner.
  • Choose Automated cloud flow.
Create Automated Cloud Flow
Create Automated Cloud Flow

Select a Trigger

  • Name the flow and search for the trigger.
  • Select the trigger When a new email arrivers (V3), as we’re using Office 365 Outlook, and click the Create button.
Select a Trigger
Select a Trigger

Configure the Trigger

  • Click the trigger, the Parameters panel will appear.
  • Click Show all to display all parameters or select the necessary ones from the drop-down arrow.
  • Set Include Attachments and Only with Attachments to Yes so that the flow triggers only when an email with attachments arrives.
Configure the Trigger
Configure the Trigger

Add Actions

  • Click the Add an action icon under the trigger, the Add an action panel appears.
  • Search for Condition action and choose it.
Add Condition Action
Add Condition Action

Configure Actions

  • On the Condition Parameters panel, click the Lightning icon to insert dynamic content from previous steps.
  • Choose From value to configure the sender condition.
  • Select the Contains operation and enter “kids”, which is part of the internal email address domain, indicating the sender is from inside the organization.
Configure Condition Action
Configure Condition Action

There’re two branches under the condition, meaning different criteria will result in different actions. If the condition is true, save the email attachments to the Internal Email Attachments folder in SharePoint. Otherwise, save the email attachments to the External Email Attachments folder.

Before proceeding, create the folders in the SharePoint document library.

Create Folders
Create Folders

If the condition istrue, insert a new action Create file under the SharePoint connector.

Add Create File Action
Add Create File Action
  • Configure the Parameters for the Create file action:
    • Select the Site Address and Folder Path. If there are no options for site address selection, click Enter Custom Value and manually enter the site address of your SharePoint home page.
    • Use the Attachments Name as the File Name. You can also add the email’s Received Time for easier future retrieval. You can click See more on the dynamic content panel to view all values from the previous step or search for them directly.
    • Set the File Content to the Attachments Content.
  • Insert another Create file action if the condition is false, but set the Folder Path differently.
Create File when Condition is True
Create File when Condition is True
Create File when Condition is False
Create File when Condition is False

Save the Flow

Click the Save button at the top right corner to save the flow.

Test the Flow

  • Click the Test button at the top right corner, choose Manually,and click Test to test the flow manually.
  • Send an email with attachments to your mailbox from an internal email address and an external email address separately.
  • Verify that the attachments have been saved in the specific SharePoint folders.
Test the Flow
Test the Flow
Attachments Saved to the Specific SharePoint Folder
Attachments Saved to the Specific SharePoint Folder

Leave a Reply

Your email address will not be published. Required fields are marked *