ใช้ template “Save Office 365 email attachments to specified OneDrive for Business folder”

by

Control Structure: Iteration

Flow Type: Automated Cloud Flow

บทความนี้เขียนขึ้นเพื่อให้ผู้เริ่มใช้งาน Power Automate Cloud รู้จักกับ Template ที่สามารถหยิบไปใช้งานได้ทันที และได้เรียนรู้เกี่ยวกับรูปแบบการทำงานของคอมพิวเตอร์แบบ Iteration (การทำงานแบบวนซ้ำ) และรู้จักกับประเภทของ Cloud flow แบบ Automated (ทำงานจากเหตุการณ์ที่กำหนด)

ไปที่ Power Automate คลิก Template แล้วค้นหา ‘save office 365 attachment to onedrive business’ จากนั้นคลิกที่ template ‘Save Office 365 email attachments to specified OneDrive for Business folder’

Save Office 365 email attachments to specified OneDrive for Business folder

แก้ไข condition ต่างๆ ตามความต้องการของคุณ สำหรับบทความนี้ เราจะสนใจ ‘Subject mail’ ที่มีคำว่า ‘RESUME’ หรือ ‘CV’ ดังนั้นเราจะเขียน expression ทางด้านซ้ายมือตามรูปภาพและ code block ด้านล่าง

Wrie expression as per your requirements

Expression ทางซ้ายมือ:

toUpper(triggerOutputs()?['body/subject'])

Expression นี้จะเปลี่ยน subject mail ให้เป็นตัวพิมพ์ใหญ่ ดังนั้นไม่ว่าผู้ส่งจะพิมพ์ subject มาเป็น resume, Resume, RESUME, Cv, cv, CV เมื่อไปตรวจสอบกับคำที่อยู่ทางขวาที่เป็น RESUME หรือ CV ก็จะทำให้เงื่อนไขเป็นจริง

เลือก ‘Folder Paths’ ในฝั่ง true condition เพื่อเก็บไฟล์แนบจาก email ที่เข้าเงื่อนไข

Select folder path that you want to save file to OneDrive

ลบ action ที่อยู่ใน false condition เพราะว่าในที่นี้เราไม่ต้องการเก็บไฟล์อื่นที่ไม่เกี่ยวกับ Resume หรือ CV (ไม่เข้าเงื่อนไขของ expression ด้านบน)

Delete action in false condition

Test the flow

กด Run flow แล้วลองส่ง mail ที่มีไฟล์แนบ โดยตั้ง subject mail ให้มีคำว่า resume หรือ cv เพื่อให้เข้าเงื่อนไข true condition

Email example

Flow run success

Flow run successfully

Power Automate save file in OneDrive

Did You Enjoy this Article?

Subscription to get new articles sent to your inbox each week for FREE

Question?

If you have any questions or feedback about this article please leave a message in the comments section below.

Subscribe to get new articles sent to your inbox each week for FREE