Skip to content

Gmail Trigger node common issues#

รวม error และปัญหาที่พบบ่อยกับ Gmail Trigger node พร้อมวิธีแก้ไขหรือแนวทางตรวจสอบ

401 unauthorized error#

ข้อความ error เต็มจะประมาณนี้:

1
401 - {"error":"unauthorized_client","error_description":"Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."}

error นี้เกิดจาก credential ที่ใช้มีปัญหาเรื่อง scope หรือ permission

วิธีแก้ไข:

  1. ถ้าใช้ OAuth2 credential ให้แน่ใจว่าได้เปิด Gmail API ใน APIs & Services > Library แล้ว ดูวิธีเปิดได้ที่ Google OAuth2 Single Service - Enable APIs
  2. ถ้าใช้ Service Account credential:
    1. Enable domain-wide delegation
    2. ตรวจสอบว่าได้เพิ่ม Gmail API ใน domain-wide delegation configuration แล้ว