In Day 1 you learned the What/Why/Where/When of Power Automate, and in Day 2 you met Connectors & Triggers.
Today weāll build your first working automationāno code needed.
Weāll create this real-life flow:
Scenario: Save every email attachment with āReportā in the subject to a specific OneDrive folderāautomatically.
ā Prerequisites
- Microsoft 365 account with Outlook and OneDrive for Business
- Access to Power Automate: go to
make.powerautomate.com
- A OneDrive folder created for saved files (e.g.,
/Reports
)
š§ What weāre building (at a glance)
[Trigger: When a new email arrives]
ā (only with attachments + subject contains āReportā)
ā¼
[Loop over each attachment]
ā¼
[Create file in OneDrive /Reports/ā¦]
ā¼
[Optional: Teams notification or mark email as read]
š ļø Step-by-Step: Create the Flow
Step 1: Open Power Automate
- Visit make.powerautomate.com
- Left menu ā Create
- Choose Automated cloud flow

Step 2: Name & Choose Trigger
- Flow name:
Save Report Attachments to OneDrive
- Trigger: Search Outlook ā select When a new email arrives (V3) ā Create

Step 3: Configure the Trigger
In the trigger card, set:
- Folder:
Inbox
(or a subfolder if needed) - Include Attachments:
Yes
- Only with Attachments:
Yes
- Subject Filter:
Report
(or āSales Reportā, āInvoiceā, etc.)
š” Tip: Using āOnly with Attachments = Yesā prevents the flow from running on emails with no files.

Step 4: Add āApply to eachā (loop over attachments)
- Click + New step
- Search Apply to each
- In Select an output from previous steps, choose Attachments (from the triggerās dynamic content)
This tells the flow to run the next steps for each attachment found in the email.
Step 5: Inside the loop ā Create the file in OneDrive
- Inside Apply to each, click Add an action
- Choose OneDrive for Business ā Create file
- Configure:
- Folder Path:
/Reports
(or browse to your folder) - File Name: Click in the field and insert Name (from the attachment)
- File Content: Insert Content bytes (from the attachment)
- Folder Path:
š§ Why Content bytes? Thatās the actual file content of the attachment.

(Optional) Step 6: Post a Teams notification
- Still inside the loop, click Add an action
- Choose Microsoft Teams ā Post a message in a chat or channel
- Set:
- Post as: Flow bot
- Post in: Channel
- Team/Channel: Choose your team & channel
- Message:
Saved: @{items('Apply_to_each')?['name']} from @{triggerOutputs()?['body/from']} to /Reports
šÆ This gives you instant visibility that a file was saved.
Step 7: Save & Test
- Click Save (top-right)
- Click Test ā Manually
- Send yourself an email:
- Subject contains āReportā
- At least one attachment
- Return to flow run ā Run history to see success/fail and outputs
š§Ŗ Verify It Worked
- Open OneDrive ā /Reports
- The attachment(s) should appear with the same file name
- If you enabled Teams notification, check the message in your channel
š§° Common Pitfalls & Fixes
- Flow didnāt trigger?
- Subject didnāt match your Subject Filter exactly
- Email didnāt land in the Inbox folder you selected
- Only with attachments is Yes, but the email had no files
- File name errors (invalid characters)?
- Rare, but if a subject or name introduces invalid characters, keep File Name as the original Name dynamic value (thatās safest).
- If you really need custom naming, keep it simple (e.g.,
{Name}
orReport_{utcNow()}.xlsx
).
- Large or many attachments:
- Start small. If you often get huge files, consider adding a Condition step to skip files above a size threshold (available as dynamic content in some connectors) or run the flow less frequently with rules in Outlook.
š§© Variations You Can Try
Variation A: Move email after saving files
- After the OneDrive action, add Outlook ā Move email (V2)
- Message Id: from the trigger
- Destination folder: e.g.,
/Processed/Reports
Keeps your Inbox cleanāautomation + tidy mail = š
Variation B: Add a timestamp to file names
- In File Name, combine dynamic content:
@{utcNow()}_@{items('Apply_to_each')?['name']}
- Result:
2025-09-01T08:30:00Z_Report.xlsx
Variation C: Send approval if file is from a VIP sender
- Add a Condition after the trigger:
- If From equals
manager@contoso.com
ā start Approvals ā Start and wait for an approval
- If From equals
- Else ā just save to OneDrive
š§ Pro Tips (Beginner-friendly)
- Start with Templates: In Power Automate, go to Templates and search āsave email attachmentsāācustomize from there.
- Scope your trigger: Use Subject Filter / From to avoid unnecessary runs.
- Add a safety Condition: If Attachments length is
0
, Terminate (just in case). - Monitor run history: Red = failed, Grey = skipped, Green = success. Click into any run to see inputs/outputs per action.
- Name your actions clearly: e.g., āCreate OneDrive file ā Attachmentā (helps a lot when debugging later).
š Bonus: A Second Beginner Flow (5 minutes)
Forms ā Teams + Excel log
- Trigger: Microsoft Forms ā When a new response is submitted
- Action: Forms ā Get response details
- Action: Teams ā Post a message in a channel (share key answers)
- Action: Excel Online (Business) ā Add a row into a table (store responses in a central log)
Perfect for simple surveys, feedback, or lead captureāsuper easy win.
ā Wrap-Up
Youāve just built your first Power Automate flowāand proved to yourself that automation doesnāt require coding.
From here on, youāll start spotting opportunities everywhere: āIf this happens ā then do that.ā
Next up: weāll explore flow best practices (variables, conditions, error handling, and performance tips) so your automations are clean, reliable, and scalable.
Discover more from Quickinfoz
Subscribe to get the latest posts sent to your email.