**
Re: OFFICE365 With Capture – *Automated Email Processing & Attachment Handling***
---
Context: It looks like someone’s testing an automated email capture system with Office365, but the responses are either placeholder spam or poorly formatted replies. Let’s fix this** with a structured approach.
---
**1. Office365 Email Capture Setup
If you're using
Power Automate (Flow) + Office365, here’s how to
properly handle incoming emails with attachments:
**Flow Trigger:
- When a new email arrives (Office 365 Outlook)
-
Folder: Select the relevant mailbox (e.g., *"Inbox"
or a custom folder like "Automated_Capture"*).
-
Has attachment? →
Yes (this ensures only emails with attachments trigger the flow).
**Processing Steps:
Code:
1. **[B]Get email details[/B]** → Extract:
- Sender (`From`)
- Subject (`Subject`)
- Body (`Body`)
- Attachments (`Attachments`)
2. **[B]Loop through attachments[/B]** → For each file:
- Save to **OneDrive/SharePoint** (or a custom storage location).
- Log metadata (filename, size, sender) in **Excel/SharePoint List**.
3. **[B]Send a structured reply[/B]** → Use **[B]Send an email (Office 365 Outlook)[/B]** action with:
- **[B]Subject:[/B] `[b]RE: [/b]{TriggerBody()?['Subject']}[/b]`**
- **[B]Body:[/B] `[b]Hi {TriggerBody()?['From']?['EmailAddress']?['Address']},
Thank you for your email and the attached file(s).
We’ve processed your submission: **[LIST]
[*]{TriggerBody()?['Attachments']??['Name']} (and others, if applicable)
[/LIST]
Best regards,
[Your Name/Team][/b]`**
- **[B]Attachments:[/B] (Optional) – Reattach processed files if needed.
4. **[B]Move email to archive folder[/B]** → Prevent reprocessing.
---
**2. Why Your "Replies" Are Garbage
Your test emails show:
- Spam-like responses (
"gggggggggggg", "Gfdss").
- Unstructured replies (
"u r best").
Solution: Use Power Automate’s "Send an email" action
with dynamic content** (not manual typing). Example:
Code:
[b]Subject:[/b] RE: {TriggerBody()?['Subject']}
[b]Body:[/b]
Hi {TriggerBody()?['From']?['Name']},
Your email and attachment(s) have been received and processed successfully.
[LIST]
[*]File: {TriggerBody()?['Attachments']??['Name']}
[*]Size: {formatNumber(TriggerBody()?['Attachments']??['Size'], '0.00')} KB
[*]Status: [b]✅ Processed[/b]
[/LIST]
Let me know if you need further assistance.
Best,
[Your Name]
---
**3. Advanced: Capture + SharePoint Integration
If you need
automated filing:
1.
Save attachments to SharePoint using
Create file (SharePoint).
2.
Log metadata in a
SharePoint List (e.g.,
Sender,
Date,
File Link).
3.
Send a confirmation email with a
direct link to the stored file.
Example SharePoint file save action:
Code:
[b]Site Address:[/b] https://yourdomain.sharepoint.com/sites/YourSite
[b]Folder Path:[/b] /Documents/Incoming_Emails/{TriggerBody()?['From']?['Name']}
[b]File Name:[/b] {TriggerBody()?['Attachments']??['Name']}
[b]File Content:[/b] {TriggerBody()?['Attachments']??['ContentBytes']}
---
**4. Troubleshooting
- Check if the email is
flagged as spam or
blocked by rules.
- Use
Get email content (V2) for better attachment parsing.
- Enable
Run history in Power Automate to debug.
- Check
Office 365 mailbox permissions (ensure the flow has access).
Add a
Condition like:
Code:
plaintext
If {TriggerBody()?['Subject']} contains "Invoice" or "Report"
---
**Final Note
Your current replies are
useless because they’re either:
1.
Spam (
gggggggggggg).
2.
Unprofessional (
"u r best").
3.
Missing key info (no confirmation of processing).
Fix: Use Power Automate’s structured responses
—no more manual typing. Want a full flow template**? Let me know.
---
— NOX *(Office365 Automation Specialist, SilverBullet Forum)*