Wilmar AI Cafe
โ† Back to menu

Week 8 ยท Power Automate

A hands-on session where everyone builds two automations: saving Outlook email attachments to OneDrive for Business, and getting notified when someone changes a file in SharePoint.

๐Ÿ“… Fri 11 Sep ยท 4โ€“5 PM
๐Ÿ“ Wilmar office
๐Ÿงญ Guided build
โฑ๏ธ 60 min
Host ยท Xinran Liu

๐Ÿ“ฆ Class materials

Download this and email it to yourself โ€” it is the attachment we use to test the flow. A CSV of 20 fictional sugar trade confirmations (contract number, counterparty, grade, tonnage, price, laycan, vessel, payment term, status). Nothing in it is real, so it is safe to send around, save to OneDrive and delete afterwards.

Send it to yourself with the subject Power Automate Test before the session so you have something waiting when the flow goes live.

Menu

Follow along, build your first flow, test it, improve it with conditions, then build a second one.

1
10 min

What Is Power Automate?

Learn the basic idea of automation using three simple concepts: trigger, action, and flow.

Simple explanation
  • Trigger: something happens, such as a new email arriving.
  • Action: Power Automate does something, such as saving a file.
  • Flow: the full automation from trigger to actions.
Example
When a new email arrives with an attachment โ†’ save the attachment to OneDrive for Business.
Power Automate is not about learning every connector. It is about solving one repetitive task at a time.
0
Setup

Before You Start

Make sure you have the right access and a test email ready before building the flow.

Participant checklist
  • Open Power Automate at make.powerautomate.com.
  • Use your work account.
  • Make sure Outlook and OneDrive for Business are available.
  • Create or confirm a OneDrive folder called Email Attachments.
  • Download Sugar_Trade_Confirmations_Sample.csv from Class materials above.
  • Email it to yourself so there is a test message ready.
  • For section 4, have a SharePoint site and document library you can upload to.
Test email
To: yourself Subject: Power Automate Test Attachment: Sugar_Trade_Confirmations_Sample.csv
The file is dummy data โ€” no real counterparties, prices or contracts โ€” so nothing sensitive leaves your mailbox while you are testing.
2
25 min

Build: Save Email Attachments to OneDrive

Create an automated cloud flow that watches for new Outlook emails with attachments and saves those attachments into OneDrive for Business.

Step 1: Create the flow
  • Go to Create.
  • Choose Automated cloud flow.
  • Name the flow Save Outlook Attachments to OneDrive.
  • Select trigger When a new email arrives (V3).
Step 2: Configure the email trigger
  • Folder: Inbox
  • Include Attachments: Yes
  • Only with Attachments: Yes
Step 3: Add attachment loop
  • Add Apply to each.
  • Select the email attachments dynamic content.
  • This is needed because one email can contain more than one attachment.
Step 4: Create file in OneDrive for Business
  • Inside the loop, add Create file from OneDrive for Business.
  • Folder Path: /Email Attachments
  • File Name: Attachment Name
  • File Content: Attachment Content
Step 5: Save and test
  • Save the flow.
  • Send yourself an email with an attachment.
  • Check the run history.
  • Open OneDrive and confirm the file was saved.
This is the key success moment: an attachment arrives in Outlook and appears automatically in OneDrive.
3
5 min

Improve the Flow

Add a simple filter or condition so the automation saves only the attachments you actually care about.

Choose one improvement
  • Only save PDFs: check whether Attachment Name ends with .pdf.
  • Only save invoice emails: filter email subject containing Invoice.
  • Save by sender: create or use a folder based on who sent the email.
Example condition
If Attachment Name ends with .pdf โ†’ Create file in OneDrive Otherwise โ†’ Do nothing
Automation becomes more useful when you add simple rules that match how you actually work.
4
15 min

Build: Tell Me Who Changed What in SharePoint

A second flow that watches a SharePoint document library and emails you whenever a file is modified โ€” which file, who touched it, and when.

Why this one

Shared trade files get edited quietly. A contract log or position sheet changes and nobody says so. This flow puts a note in your inbox every time the file moves, with the name of the person who moved it.

Step 1: Create the flow
  • Go to Create โ†’ Automated cloud flow.
  • Name it Notify Me When a SharePoint File Changes.
  • Select trigger When a file is created or modified (properties only) โ€” SharePoint connector.
Step 2: Point it at your library
  • Site Address: pick your SharePoint site from the list.
  • Library Name: Documents (or the library you want watched).
  • Optional: use Folder under advanced options to watch one folder only.
Step 3: Get the editor's name
  • The trigger already returns Modified By DisplayName and Modified By Email.
  • Also available: Name (file name), Modified (timestamp), Link to item.
  • No extra action is needed โ€” it is all dynamic content from the trigger.
Step 4: Send the notification
  • Add Send an email (V2) from Outlook, or Post message in a chat or channel from Teams.
  • To: yourself, or the team distribution list.
  • Subject: use file name and editor together.
  • Body: file name, who modified it, when, and the link.
Suggested message
Subject: [SharePoint] @{triggerOutputs()?['body/Name']} was modified @{triggerOutputs()?['body/Editor/DisplayName']} modified @{triggerOutputs()?['body/Name']} on @{triggerOutputs()?['body/Modified']}. Open the file: @{triggerOutputs()?['body/{Link}']}

You do not have to type the expressions. Pick Modified By DisplayName, Name, Modified and Link to item from the dynamic content panel and Power Automate writes them for you.

Step 5: Save and test
  • Upload Sugar_Trade_Confirmations_Sample.csv to the library.
  • Open it, change one price, save.
  • Wait for the trigger to poll, then check your inbox or Teams.
The trigger polls rather than firing instantly โ€” give it a minute or two before you decide it is broken. And it fires on creation as well as modification, which is usually what you want.
5
5 min

Troubleshooting & Wrap-up

Review common errors and reflect on other repetitive email tasks that could be automated next.

Common issues
  • Attachments not saving: check Include Attachments and Only with Attachments settings.
  • Wrong folder: check OneDrive folder path.
  • Connector issue: reconnect Outlook or OneDrive.
  • Duplicate files: consider adding received time or email subject to the file name.
  • No SharePoint alert: the trigger polls โ€” wait a minute, then check run history.
  • Alerts for your own edits: add a condition that Modified By Email is not your address.
  • Too many alerts: narrow the trigger to one folder, or one file type.
Reflection question
What repetitive email task do you personally want to automate next?