- 9 mm* skills (orchestrator, article, social, publish, analytics) - 6 dependency skills (content-writer, geo-optimizer, etc.) - 3 analytics scripts (GSC, Google Ads, Meta Ads) - Config template + setup guide - SOUL-MM.md persona extension - OrbitOS integration reference
3.3 KiB
3.3 KiB
Platform API Scripts — คู่มือการติดตั้ง
scripts/ เหล่านี้เป็น bridge สำหรับเชื่อมต่อกับ platform APIs ณ ตอนนี้เป็น placeholder — ต้องติดตั้ง dependencies ก่อนใช้งาน
Prerequisites (ทั่วไป)
# Hermes ต้องมี tools เหล่านี้
# web_search สำหรับค้นหาข้อมูล
# terminal สำหรับรัน scripts
Google Ads API
Dependencies
pip install google-ads
Authentication
- ไปที่ https://console.cloud.google.com/ → สร้าง Project
- Enable Google Ads API
- สร้าง OAuth 2.0 credentials → ดาวน์โหลด JSON
- ไปที่ https://ads.google.com/ → Tools → API Center
- ขอ Developer Token (ต้องผ่าน basic approval)
- ตั้งค่า environment:
export GOOGLE_ADS_DEVELOPER_TOKEN="your-token"
export GOOGLE_ADS_CLIENT_ID="your-client-id"
export GOOGLE_ADS_CLIENT_SECRET="your-client-secret"
export GOOGLE_ADS_REFRESH_TOKEN="your-refresh-token"
export GOOGLE_ADS_LOGIN_CUSTOMER_ID="manager-account-id"
ทางเลือก: Google Ads MCP Server
https://github.com/googleads/google-ads-mcp ใช้กับ Hermes/Claude โดยตรง ไม่ต้องเขียน script แยก
Meta Ads API
Dependencies
pip install facebook-business
Authentication
- ไปที่ https://developers.facebook.com/ → สร้าง App
- เพิ่ม Marketing API product
- ต้องผ่าน business verification (ใช้บัตรประชาชน/เอกบริษัท)
- Generate access token:
- permissions:
ads_read,ads_management,business_management
- permissions:
- ตั้งค่า environment:
export META_ACCESS_TOKEN="your-token"
export META_AD_ACCOUNT_ID="act_xxxxxxxx"
export META_APP_ID="your-app-id"
export META_APP_SECRET="your-app-secret"
Google Search Console API
Dependencies
pip install google-auth google-auth-oauthlib google-auth-httplib2
Authentication
ใช้ gcloud application-default credentials:
gcloud auth application-default login \
--scopes=https://www.googleapis.com/auth/webmasters.readonly
หมายสำคัญ
- seo-analysis skill มี scripts GSC ครบถ้วนที่
~/.hermes/skills/seo-analysis/scripts/ - สามารถ adapt มาใช้กับ multi-client ได้
- แต่ละ client ต้องเพิ่ม service account email ใน GSC property → Settings → Users
แนวทางการสร้าง scripts จริง
เมื่อพร้อม implement scripts จริง:
- Copy pattern จาก seo-analysis skill scripts — มีโครงสร้างครบ (analyze_gsc.py, url_inspection.py, ฯลฯ)
- แยก config ต่อ client — ใช้ .env หรือ config.json ต่อ client
- Output format — JSON ที่ orchestrator อ่านได้ (state.json friendly)
- Error handling — ถ้า token หมดอายุ หรือ API quota หมด ให้แจ้ง orchestrator