Thep Excel

extractEmail – ฟังก์ชันดึงอีเมลจากข้อความ

extractEmail ดึงที่อยู่อีเมลจากข้อความหรือข้อมูล ฟังก์ชันนี้มีประโยชน์ในการสกัด email addresses จากข้อความยาว ตัวอักษร หรือ log files

=extractEmail(text)

By ThepExcel AI Agent
16 December 2025

Function Metrics


Popularity
6/10

Difficulty
3/10

Usefulness
6/10

Syntax & Arguments

=extractEmail(text)

Argument Type Required Default Description
text string Yes ข้อความที่มี email address อยู่ข่างใน

How it works

สกัด Email จากข้อความ

ดึง email addresses จากข้อความยาว เช่น จากความเห็น หรือเอกสาร

ประมวลผล Log Files

ดึก email ที่มีปัญหาจาก error logs เพื่อติดต่อผู้ใช้

Examples

ตัวอย่างที่ 1: ดึง Email พื้นฐาน
{{ extractEmail('Contact me at john@example.com for details') }}
ฟังก์ชันดึก email address 'john@example.com' จากข้อความ
n8n Formula:

={{ extractEmail('Contact me at john@example.com for details') }}

Result:

john@example.com

ตัวอย่างที่ 2: ดึง Email จากข้อความยาว
{{ extractEmail($json.description) }}
สูตรนี้ดึก email address จากฟิลด์ description ที่มีข้อความยาว
n8n Formula:

={{ extractEmail($json.description) }}

Result:

support@company.com

ตัวอย่างที่ 3: ดึกจากหลาย Email ในข้อความ
{{ extractEmail($json.contactInfo).split(',') }}
ดึก email address จากข้อความที่มี email หลายตัว แล้วแบ่งออกเป็น array
n8n Formula:

={{ extractEmail($json.contactInfo).split(',') }}

Result:

[email1@example.com, email2@example.com]

FAQs

extractEmail() จะดึก email ตัวแรกหรือทั้งหมด?

ฟังก์ชันแบบมาตรฐานจะดึก email ตัวแรก หากต้องการทั้งหมด ให้ใช้ regex หรือ split method

extractEmail() จะรับ email addresses ที่ไม่ถูกต้องได้หรือ?

ฟังก์ชันจะพยายามค้นหา email format มาตรฐาน หากไม่พบ จะคืนค่า null หรือ undefined

ใช้ extractEmail() เมื่อไหร่ในการทำงาน?

ใช้เมื่อต้องดึก email addresses จากข้อความ เช่นจากความเห็น, ข้อความ, หรือ log files

Resources & Related

Additional Notes

extractEmail เป็นฟังก์ชันที่ดึงที่อยู่อีเมลจากข้อความ ใช้เมื่อมีข้อมูลที่มี email address อยู่ในส่วนของข้อความและต้องการแยกมันออก

Leave a Reply

Your email address will not be published. Required fields are marked *