ตำแหน่งของฉันด้วย instant cloud flow

by

บทความนี้จะเขียนเรื่องการใช้ instant cloud flows โดยใช้ trigger ‘Manually trigger a flow’.

ตั้งชื่อโฟลว์, เลือก trigger แล้วกดปุ่ม create

Name the flow e.g. I’m here

กดเครื่องหมาย + แล้วกด add an action

Add action

ค้นหา action ชื่อ ‘Current time’

Add action current time

เพิ่ม action ‘Convert time zone’ แล้วใส่ dynamic content ‘Current time’ และเลือก destination time zone กับ time format ตามรูป

Add action convert time zone

เพิ่ม action ‘Post message in a chat or channel’ เลือก post as, post in, team, channel และ message ตามรูปและ code block ด้านล่าง

<p>Current Time @{formatDateTime(body('Convert_time_zone'),'g')}<br>
<a href="https://www.google.com/maps/search/?api=1&query=@{triggerBody()['location']['coordinates']['latitude']},@{triggerBody()['location']['coordinates']['longitude']}">Map</a></p>

ใน code block นี้ แสดงให้เห็น ตำแหน่งใน Google Map โดยใช้พิกัด latitude และ longitude ซึ่งเราแทนที่ด้วย dynamic content ที่ได้จาก trigger ขณะที่กดปุ่ม เพื่อนๆสามารถดู Maps URLs Guide ได้ที่นี่

Click toggle code view before paste the message from above code block

รันโฟลว์แล้วตรวจสอบผลลัพธ์ที่ Microsoft team channel

Team channel

Flow bot จะส่งข้อความพร้อม hyperlink ของตำแหน่งใน Google Map มาให้

Message with hyperlink to Google Map location

รูปภาพด้านล่างแสดงตำแหน่ง Google Map ของสถานที่ต่างๆ 3 แห่ง

รูปแรกแสดงตำแหน่งบ้านของดิฉันเองค่ะ 😂 (censored for privacy)

Google Map location (My Home)

รูปที่สองแสดงตำแหน่งใกล้ๆ กับรถไฟฟ้า BTS ซึ่งกดปุ่มขณะเดินทางด้วย BTS จากสถานีอโศกไปสถานีนานา

รูปที่สามแสดงตำแหน่งใกล้กับหอศิลปวัฒนธรรมแห่งกรุงเทพมหานคร (BACC) ซึ่งกดปุ่มขณะนั่งอยู่ในหอศิลป์

หวังว่าบทความนี้จะเป็นประโยชน์สำหรับผู้เริ่มต้นใช้งาน Power Automate นะคะ แล้วพบกันใหม่ Happy Automating!! 😁

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.


Comments

Leave a comment

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