Contact
Line : comsiam
Contact
Line : comsiam

วิธีสร้าง Flow ด้วยภาษาธรรมชาติใน Microsoft Power Automate โดยไม่ต้องเขียนโค้ด ทำได้โดยเปิด Power Automate เลือก Home → Create with Copilot จากนั้นอธิบายกระบวนการที่ต้องการด้วยข้อความธรรมดา เช่น “When a new item is created in SharePoint, send a notification to Microsoft Teams” แล้วให้ Copilot ช่วยสร้าง Trigger และ Actions ก่อนตรวจสอบ Connections ตั้งค่าข้อมูล และกด Save กับ Test เพื่อทดลองใช้งาน
การสร้าง Flow ด้วยวิธีนี้เรียกว่า Natural Language Automation คือการใช้คำสั่งภาษามนุษย์อธิบายงานที่ต้องการ แล้วให้ AI ช่วยแปลงเป็นกระบวนการอัตโนมัติ
ผู้ใช้ไม่จำเป็นต้องเริ่มจากการเขียนโปรแกรม Python, JavaScript หรือ C# เพราะ Power Automate มีเครื่องมือ Low-Code สำหรับเชื่อมระบบต่างๆ เช่น SharePoint, Microsoft Teams, Outlook, Dataverse และ Microsoft Forms
ตัวอย่างเช่น เมื่อพนักงานกรอกแบบฟอร์มแจ้งซ่อมคอมพิวเตอร์ ระบบสามารถสร้างรายการใน SharePoint และส่งข้อความแจ้งเตือนทีม IT โดยอัตโนมัติ โดยใช้ Copilot ช่วยออกแบบขั้นตอนเริ่มต้น
อย่างไรก็ตาม การสร้าง Flow แบบ No-Code ไม่ได้หมายความว่าระบบจะพร้อมใช้ทันที ผู้สร้างยังต้องกำหนด Site Address, List Name, Connections, Dynamic Content และ Permissions ให้ถูกต้อง
บทความนี้ comsiam จะสอนสร้าง Flow ด้วยภาษาธรรมชาติใน Power Automate แบบละเอียด ตั้งแต่การเขียน Prompt การสร้าง Automated, Instant และ Scheduled Flows การตั้งค่า Conditions และ Dynamic Content การใช้ SharePoint, Teams และ Outlook รวมถึงตัวอย่างระบบแจ้งซ่อม IT งาน Fiber Optic และ CCTV พร้อมวิธีทดสอบและแก้ไขข้อผิดพลาดก่อนใช้งานจริง
Natural Language Flow คือแนวทางสร้างระบบ Automation โดยอธิบายสิ่งที่ต้องการเป็นข้อความธรรมดา แทนการกำหนดทุกขั้นตอนด้วยตนเองตั้งแต่ต้น
Copilot จะช่วยตีความคำขอและเสนอ Cloud Flow ที่ประกอบด้วย Trigger และ Actions
ผู้ใช้พิมพ์:
“When a new support ticket is created in SharePoint, notify the IT team in Microsoft Teams.”
Copilot อาจเสนอขั้นตอนดังนี้
| หัวข้อ | สร้าง Flow ด้วยตนเอง | สร้างด้วย Copilot |
|---|---|---|
| จุดเริ่มต้น | เลือก Trigger เอง | พิมพ์คำอธิบาย |
| การเลือก Actions | เลือกเอง | AI ช่วยเสนอ |
| การค้นหา Connectors | ผู้สร้างดำเนินการ | AI ช่วยเลือก |
| การตั้งค่าระบบ | ต้องตรวจสอบ | ต้องตรวจสอบ |
| การเขียนโค้ด | ไม่จำเป็นสำหรับงานพื้นฐาน | ไม่จำเป็นสำหรับงานพื้นฐาน |
| การแก้ไข | ผ่าน Designer | ผ่าน Designer และ Copilot |
| การทดสอบ | ต้องทำ | ต้องทำ |
| เหมาะกับ | ผู้ที่รู้โครงสร้าง Flow | มือใหม่และผู้ใช้ทั่วไป |
ไม่ได้ทั้งหมด
Copilot สามารถช่วยสร้างและแก้ไข Flow แต่ยังต้องมีผู้ตรวจสอบการเชื่อมต่อ สิทธิ์ และผลการทำงานจริง
เหตุการณ์ที่เริ่ม Flow
ตัวอย่าง:
มีข้อมูลใหม่ใน SharePoint
สิ่งที่ระบบดำเนินการ
ตัวอย่าง:
ส่งข้อความไป Microsoft Teams
บริการที่ Flow เชื่อมต่อ
ตัวอย่าง:
SharePoint Connector
บัญชีและสิทธิ์ที่ใช้เชื่อมบริการ
ข้อมูลที่นำมาจากขั้นตอนก่อนหน้า
ตัวอย่าง:
Title, Priority และ Location
เงื่อนไขสำหรับตัดสินใจว่าจะดำเนินงานอย่างไร
ตัวอย่าง:
หาก Priority เป็น High จึงแจ้งเตือนแบบเร่งด่วน
Trigger → Get Data → Condition → Action → Result
โครงสร้างนี้สามารถสร้างได้ด้วยเครื่องมือ Low-Code โดยไม่ต้องเขียนโปรแกรมสำหรับกรณีทั่วไป
ตัวอย่างแรกคือสร้างระบบแจ้งเตือนเมื่อมีรายการใหม่ใน SharePoint
ลงชื่อเข้าใช้ด้วยบัญชีองค์กรหรือสถานศึกษาที่มีสิทธิ์ใช้งาน
ตรวจสอบว่า Environment ที่เลือกมีสิทธิ์ใช้ Connectors ที่ต้องการ
ระบบจะแสดงช่องให้พิมพ์คำอธิบาย Flow
ตัวอย่าง:
“When a new item is created in a SharePoint list, post a message to a Microsoft Teams channel.”
Copilot จะวิเคราะห์และเสนอ Trigger กับ Actions
ดูว่าเลือกเครื่องมือถูกต้องหรือไม่
ตรวจสอบ SharePoint และ Teams Connections
ระบบเปิด Cloud Flow Designer
กำหนด Site Address และ List Name
กำหนด Team และ Channel
ใช้ข้อมูล Title หรือ Fields ที่ต้องการ
หากทุกขั้นตอนถูกต้อง Flow จะทำงานตามเหตุการณ์ที่กำหนด
การเขียน Prompt ที่ดีควรมีข้อมูล 5 ส่วน
When…
From SharePoint, Outlook หรือ Dataverse
If…
Send, Create, Update หรือ Notify
Teams, Email หรือระบบอื่น
When [Trigger], if [Condition], perform [Action] in [Destination] using [Data].
“When a new item is created in the IT Support Tickets SharePoint list, if the priority is High, post a message to the IT Support Teams channel with the ticket title and location.”
เพราะระบุเหตุการณ์และผลลัพธ์ชัดเจน ช่วยให้ Copilot เลือกองค์ประกอบ Flow ได้ตรงงานมากขึ้น
“When a new ticket is created in SharePoint, notify the IT Support Teams channel.”
“When a new request is submitted through Microsoft Forms, send an email notification to the support team.”
“When a Microsoft Forms response is submitted, get the response details and create a SharePoint list item.”
“When a new SharePoint item has priority High, post a message to the emergency support Teams channel.”
“Every weekday at 8 AM Bangkok time, send an email summary of open IT support tickets.”
“When a Dataverse support ticket is updated, notify the requester if its status changes to Resolved.”
“When a new email with attachments arrives, save the attachments to a SharePoint document library.”
“When a new maintenance task is assigned in Dataverse, send a Teams message to the assigned technician.”
“Every morning, check overdue support tickets and notify the assigned technicians.”
“When an IT support ticket changes to Closed, send a confirmation email to the requester.”
“When a new file is added to a SharePoint folder, copy it to the designated backup folder.”
“When a document is uploaded to SharePoint, start an approval process with the document owner.”
“When an approval is completed, notify the requester of the result.”
“When a new fiber optic installation project is created in Dataverse, notify the installation team in Microsoft Teams.”
“Every day at 8 AM, check CCTV inspections scheduled for today and send a Teams notification to the maintenance team.”
หมายเหตุ: Prompt เหล่านี้เป็นคำสั่งตัวอย่าง ผู้ใช้ต้องตั้งค่า Connections, ข้อมูลและเงื่อนไขเพิ่มเติมให้ตรงกับระบบจริง
สามารถทดลองอธิบายความต้องการเป็นภาษาไทยได้ แต่ Copilot สำหรับ Cloud Flows ปัจจุบันปรับให้เหมาะกับภาษาอังกฤษเป็นหลัก และมีข้อจำกัดด้านการรองรับภาษาอื่น
“เมื่อมีรายการใหม่ใน SharePoint ให้ส่งข้อความแจ้งเตือนไปยัง Microsoft Teams”
“When a new item is created in SharePoint, post a message to a Microsoft Teams channel.”
หากต้องการความเข้ากันได้สูง ควรใช้ Prompt ภาษาอังกฤษ
แต่ข้อความที่ Flow ส่งไปยัง Teams หรือ Outlook สามารถใช้ภาษาไทยได้ตามการตั้งค่าของ Action
เมื่อพนักงานสร้างรายการแจ้งซ่อม ระบบส่งข้อความไปยังทีม IT
SharePoint List:
IT Support Tickets
ตัวอย่าง Fields:
“When a new item is created in the IT Support Tickets SharePoint list, post a message to the IT Support Microsoft Teams channel with the ticket number, title, location, and priority.”
แจ้งซ่อม IT ใหม่
หมายเลข: IT-1001
ปัญหา: Wi-Fi ชั้น 3 ใช้งานไม่ได้
สถานที่: ชั้น 3
ความเร่งด่วน: High
ข้อมูลที่แสดงต้องมาจาก Dynamic Content จริง ไม่ใช่หมายเลข Ticket สมมติ
ตัวอย่างนี้เป็นระบบรับคำขอที่มีหลายขั้นตอน
เมื่อพนักงานส่ง Microsoft Forms ให้สร้างรายการใน SharePoint และแจ้งทีมงาน
“When a new response is submitted in Microsoft Forms, get the response details, create a new item in the IT Support Tickets SharePoint list, and notify the IT Support Teams channel.”
เตรียมคำถาม เช่น
ใช้ Columns ที่สอดคล้องกับข้อมูล Forms
ใช้ Prompt ด้านบน
จับคู่คำตอบ Forms กับ Columns ใน SharePoint
ส่ง Forms ตัวอย่าง
ดูว่ามีรายการใหม่จริง
ดูว่ามีข้อความแจ้งเตือน
หากการสร้างรายการ SharePoint ล้มเหลว ควรออกแบบไม่ให้ส่งข้อความแจ้งว่างานถูกบันทึกสำเร็จแล้ว
บริษัทรับติดตั้ง Fiber Optic สามารถสร้าง Automation สำหรับแจ้งคำขอสำรวจหน้างาน
“When a new fiber optic installation request is created in Dataverse, send a Microsoft Teams notification to the installation team with the customer name, location, cable distance, and requested service.”
ช่วยให้ฝ่ายประเมินงานได้รับข้อมูลเร็วขึ้น ลดการแจ้งงานผ่านข้อความส่วนตัวหลายช่องทาง
แจ้งเตือนทีมช่างเมื่อถึงกำหนดตรวจสอบ CCTV
“Every day at 8 AM Bangkok time, retrieve CCTV maintenance tasks due today from SharePoint and notify the maintenance team in Microsoft Teams.”
หากไม่พบงานครบกำหนด ควรออกแบบว่าจะไม่ส่งข้อความ หรือส่งข้อความสรุปว่าไม่มีงาน ตามความต้องการจริง
Scheduled Flow ใช้สำหรับงานที่ต้องทำเป็นประจำ
ส่งรายงาน Ticket ค้างทุกวันทำงาน
“Every weekday at 8 AM Bangkok time, get open support tickets from SharePoint and email a summary to the IT manager.”
ควรเลือก Time Zone ที่สอดคล้องกับประเทศไทย เช่น Bangkok หรือ UTC+07:00 ตามตัวเลือกของระบบ
ไม่ควรสมมติว่าระบบใช้เวลาไทยโดยอัตโนมัติ
Condition ใช้ตรวจสอบเงื่อนไขก่อนดำเนินงาน
เมื่อ Priority เป็น High ให้ส่งข้อความ Teams
“Add a condition that checks whether the priority is High. If true, post a message to the IT Support Teams channel.”
If Priority = High
ส่ง Teams Notification
Else
ดำเนินงานตามกระบวนการปกติ
หาก Priority เป็น Choice Field ต้องตรวจสอบว่าระบบส่งค่าชนิดใด ไม่ควรเปรียบเทียบผิดประเภท
Dynamic Content ช่วยนำข้อมูลจาก Trigger หรือ Actions ก่อนหน้ามาใช้กับขั้นตอนถัดไป
SharePoint Trigger ส่งข้อมูล
Flow สามารถเลือกข้อมูลเหล่านี้เพื่อสร้างข้อความ Teams ได้
“มีรายการแจ้งซ่อมใหม่ หมายเลข [ID] เรื่อง [Title]”
ใน Power Automate ควรแทรก Dynamic Content ผ่าน Designer เพื่อให้ข้อความใช้ค่าจริง
ผู้สร้างพิมพ์คำว่า Title ลงในข้อความโดยไม่ได้เลือก Dynamic Content
ผลลัพธ์คือ Teams ได้รับข้อความที่มีคำว่า Title แทนชื่อรายการจริง
หลังสร้าง Flow แล้ว สามารถใช้ Copilot ใน New Designer เพื่อช่วยแก้ไข
เพิ่มอีเมล
“Add an email action after posting the Teams notification.”
ลบ Action
“Delete the unnecessary email action.”
เปลี่ยนจาก Email เป็น Teams
“Replace the email action with a Teams channel notification.”
เพิ่ม Condition
“Add a condition to send messages only when Priority is High.”
อธิบาย Flow
“What does this flow do?”
Copilot ใน New Designer อาจไม่รองรับ Flow บางรูปแบบ เช่น Flows ที่ใช้ Trigger หรือ Connectors บางรุ่น
จึงต้องตรวจสอบ Compatibility ก่อนใช้งาน
เช่น เพิ่ม SharePoint Item ใหม่
ดูว่าเริ่มทำงานถูกต้อง
ดูว่าสำเร็จทุกขั้นตอนหรือไม่
เช่น Microsoft Teams หรือ Outlook
เพราะการทดสอบที่ดีต้องยืนยันว่าข้อมูลหรือข้อความที่ต้องการถูกส่งหรือบันทึกจริง
ไม่ควรดูเพียงว่า Flow ไม่มี Error ในหน้าจอ
การใช้ AI ช่วยสร้าง Flow ไม่ได้หมายความว่า Flow จะมีสิทธิ์และความปลอดภัยเหมาะสมโดยอัตโนมัติ
ต้องตรวจสอบแต่ละ Connector และระบบปลายทางด้วย
ตรวจสอบ Region, License และ Environment
ตรวจสอบการเปิดใช้งานและนโยบายองค์กร
Copilot สำหรับ Cloud Flows ต้องใช้บัญชี Work หรือ School ตามข้อกำหนด
ใช้ภาษาอังกฤษ
แก้ Trigger ให้ตรงกับเหตุการณ์
เปลี่ยน Connector ใน Designer
ตรวจสอบ Credentials และ Permissions
ตรวจ Site Address และ List Name
ตรวจ Team, Channel และ Connection
ตรวจสิทธิ์และข้อมูลผู้รับ
ตรวจ Trigger และขั้นตอนก่อนหน้า
ตรวจ Data Type และค่าที่เปรียบเทียบ
ตรวจ Trigger Conditions และการอัปเดตรายการ
เพิ่มกลไกป้องกัน Duplicate
ตรวจ Time Zone
ตรวจ Run History
ตรวจ Connections และสิทธิ์ปลายทาง
ตรวจจำนวนการเรียกและ Retry
ใช้ Classic Designer สำหรับกรณีที่ยังไม่รองรับ
ปรับ Prompt ตรวจขั้นตอน แล้ว Test ซ้ำ
| รายการ | สิ่งที่ต้องตรวจสอบ |
|---|---|
| Prompt | ชัดเจน |
| Trigger | ถูกต้อง |
| Actions | ครบ |
| Connectors | เหมาะสม |
| Connections | พร้อมใช้ |
| Dynamic Content | ถูกต้อง |
| Conditions | ทดสอบแล้ว |
| Time Zone | ถูกต้อง |
| Duplicate Prevention | มีเมื่อจำเป็น |
| Error Handling | พร้อม |
| Permissions | เหมาะสม |
| Data Policies | ผ่าน |
| Save | สำเร็จ |
| Test | ผ่าน |
| Run History | ตรวจสอบแล้ว |
| End-to-End Result | ถูกต้อง |
| Owner | มีผู้ดูแล |
| License | ตรวจสอบแล้ว |
| Monitoring | พร้อม |
เป็นการใช้ภาษาธรรมชาติอธิบาย Automation แล้วให้ Copilot ช่วยสร้าง Flow
ได้สำหรับงานหลายประเภท โดยใช้ Low-Code Designer และ Copilot
เปิด Power Automate เลือก Create with Copilot พิมพ์ Prompt แล้วตรวจ Flow ก่อน Save และ Test
ได้ตามความสามารถและ Connectors ที่รองรับ
รองรับจำกัด และปรับให้เหมาะกับภาษาอังกฤษเป็นหลัก
ควรระบุ Trigger, Condition, Action, Destination และ Data ให้ชัดเจน
ได้ตามความสามารถที่รองรับ
ได้ โดยสามารถอธิบายเวลาที่ต้องการให้ระบบทำงาน
สามารถช่วยออกแบบตามความสามารถและ Trigger ที่รองรับ แต่ควรตรวจสอบชนิด Flow และขั้นตอนที่ระบบเสนอ
ได้ผ่าน SharePoint Connector
ได้ผ่าน Microsoft Teams Connector
ได้ผ่าน Microsoft 365 Outlook Connector
ได้ผ่าน Microsoft Forms Connector
เป็นข้อมูลจาก Trigger หรือ Actions ก่อนหน้าที่นำมาใช้ต่อใน Flow
ใช้ตรวจสอบเงื่อนไขก่อนดำเนิน Action
ได้ใน New Designer สำหรับ Flow ที่รองรับ
เพราะความสามารถแก้ Cloud Flow ด้วย Copilot ใช้ใน New Designer
เป็นประวัติการทำงานของ Flow ซึ่งช่วยตรวจสอบข้อผิดพลาด
ต้องมีสิทธิ์ใช้งานที่เหมาะสม โดยขึ้นอยู่กับ Connectors และความสามารถที่ใช้
ขึ้นอยู่กับ Trigger, Connection, License, Policies และสถานะบริการ
ยังต้องตรวจ Connections, Logic, Permissions และทดสอบผลจริงก่อนเปิดใช้
Microsoft Power Automate รองรับการสร้าง Cloud Flow ด้วยภาษาธรรมชาติผ่าน Copilot ทำให้ผู้ใช้สามารถอธิบายกระบวนการทำงาน แล้วให้ AI ช่วยสร้าง Trigger และ Actions ได้
ขั้นตอนหลักคือเปิด Power Automate เลือก Create with Copilot พิมพ์ Prompt ตรวจสอบ Flow ที่เสนอ กำหนด Connections แล้ว Save และ Test
การเขียน Prompt ให้ชัดเจนควรระบุว่าเหตุการณ์เริ่มต้นคืออะไร ต้องตรวจสอบเงื่อนไขอะไร และจะส่งผลลัพธ์ไปยังระบบใด
สำหรับธุรกิจ IT สามารถนำไปสร้างระบบแจ้งซ่อม ส่งข้อความผ่าน Teams บันทึกข้อมูล SharePoint และแจ้งเตือนงาน Maintenance ได้
แม้จะไม่ต้องเขียนโค้ดในงานพื้นฐาน แต่ยังต้องตรวจสอบความถูกต้อง ความปลอดภัย และการทำงานจริงของระบบ
comsiam แนะนำให้ใช้แนวทาง กำหนดงานที่ต้องการ → เขียน Prompt → ให้ Copilot สร้าง Flow → ตรวจ Trigger → ตรวจ Actions → ตั้ง Connections → เพิ่ม Conditions → ตรวจ Dynamic Content → Save → Test → ตรวจ Run History → เปิดใช้งาน → Monitor
การสร้าง Flow ด้วยภาษาธรรมชาติช่วยให้องค์กรเริ่มใช้ Automation ได้ง่ายขึ้น ลดงานซ้ำ และเพิ่มประสิทธิภาพการทำงานโดยไม่จำเป็นต้องพัฒนาระบบทั้งหมดด้วยการเขียนโปรแกรม