🇹🇭 ดึงยอดขาย Shopee, TikTok, Lazada อัตโนมัติ ไม่ต้องแมนน่วลอีกต่อไป
ใครที่ขายของออนไลน์มากกว่า 1 แพลตฟอร์ม หรือมากกว่า 1 ร้านค้า น่าจะรู้ดีว่าเวลาต้องมานั่งสรุปยอดขายสิ้นเดือนนี่ปวดหัวแค่ไหน เพราะต้องไล่ดาวน์โหลดออเดอร์แยกทีละเจ้า ทั้ง Shopee, Lazada, TikTok Shop คลิปนี้ Lin เลยมาแชร์ระบบที่ใช้จริงที่ร้าน ดึงยอดขายจากหลายแพลตฟอร์มมารวมกันแบบไม่ต้องมานั่งกดดาวน์โหลดเองทุกเดือน
BigSeller ตัวช่วยรวมออเดอร์ แต่ยังไม่มี API
เครื่องมือที่ใช้อยู่แล้วคือ BigSeller ซึ่งลิงก์กับ Shopee, Lazada และ TikTok Shop ได้ในที่เดียว ดูออเดอร์รวมได้ค่อนข้างละเอียด และกด export เป็น Excel ได้ด้วย ปัญหาคือ BigSeller ไม่มี API ให้เรียกข้อมูลอัตโนมัติ ต้องเข้าเว็บแล้วกดดาวน์โหลดเองทุกครั้ง
ทำไมสคริปต์ Python แบบเดิมถึง “เจ๊ง”
ก่อนหน้านี้เคยลองให้ทีม data engineer เขียนโค้ด Python ไปเปิดเว็บ กดดาวน์โหลดออเดอร์ แล้วยิงเข้า SQL ให้อัตโนมัติ ใช้ได้ดีอยู่พักหนึ่งแล้วก็พังบ่อยมาก สาเหตุคือเว็บพวกนี้ชอบมีป๊อปอัปแจ้งเตือน หรือหน้าตาเว็บเปลี่ยนกะทันหัน พอโค้ดถูกเขียนแบบ static ไว้ตายตัว พอเจอป๊อปอัปหรือ UI เปลี่ยนก็พังทันที เพราะโค้ดไม่รู้จะกดตรงไหนต่อ
ทางแก้: ให้ Claude ควบคุมเบราว์เซอร์แทนโค้ดตายตัว
วิธีที่ใช้แก้ปัญหาคือเปลี่ยนจากสคริปต์ static มาใช้ Claude Cowork ผ่าน extension Claude in Chrome แทน ให้ Claude ล็อกอินเข้า BigSeller (เก็บ session ไว้ ไม่ต้องล็อกอินใหม่ทุกครั้ง) ตั้งภาษา UI เป็นอังกฤษ ปิดป๊อปอัปหรือ notification ที่โผล่มา แล้วตั้งช่วงวันที่ของออเดอร์เป็น 90 วัน ถ้าดึงข้อมูล 90 วันไม่ได้เพราะติดข้อจำกัดของ Store SKU ก็ให้เปลี่ยนไปใช้ Order Number แทนแล้วลองใหม่ ขั้นตอนทั้งหมดนี้ถูกบันทึกเป็น “สกิล” (skill) ไว้ใช้ซ้ำ และตั้งเป็น weekly scheduled task ให้ทำงานให้เองทุกสัปดาห์ ข้อดีคือ Claude ปรับตัวตามหน้าเว็บที่เปลี่ยนไปได้ ไม่พังง่ายเหมือนโค้ด static
จาก Excel สู่ Database และ Dashboard
พอ Claude ดึงไฟล์ Excel ออกมาได้แล้ว ก็ให้ AI เขียน Python ง่ายๆ อ่านไฟล์ Excel แล้วโหลดข้อมูลเข้า SQL Server ต่อ พอมีข้อมูลอยู่ใน database แล้วจะทำอะไรต่อก็ได้ ในคลิปเลือกใช้ Tableau ทำ dashboard เพราะอยากลองมุมมองข้อมูลหลายแบบเร็วๆ แม้ว่าจริงๆ จะถนัด Power BI มากกว่า แต่ตอนนี้รูปแบบ dashboard ยังไม่นิ่ง เลยขอหมุนดูมุมมองต่างๆ ด้วย Tableau ไปก่อน
ส่งรายงานอัตโนมัติด้วย n8n
อีกส่วนที่ต่อยอดคือใช้ n8n ดึงข้อมูลจาก SQL ตัวเดิม แล้วส่งเป็นรายงานเข้าอีเมลอัตโนมัติ ไม่ต้องมานั่งทำรายงานส่งเองทุกเดือนอีกต่อไป
| เครื่องมือ | บทบาทในระบบนี้ |
|---|---|
| BigSeller | รวมออเดอร์จาก Shopee, Lazada, TikTok Shop ไว้ที่เดียว export เป็น Excel ได้ |
| Claude (Cowork + Chrome extension) | ล็อกอินและดาวน์โหลดรายงานแทนคน ตั้งเป็น weekly scheduled task |
| Python (เขียนโดย AI) | อ่านไฟล์ Excel แล้วโหลดเข้า SQL Server |
| Tableau / Power BI | ทำ dashboard วิเคราะห์ยอดขายรายเดือน |
| n8n | ดึงข้อมูลจาก SQL ส่งรายงานเข้าอีเมลอัตโนมัติ |
บทเรียนที่ได้: ไม่มีเครื่องมือเดียวที่ตอบโจทย์ทุกอย่าง
กว่าจะตั้งสกิลนี้ให้นิ่งก็ใช้เวลา “เถียง” กับ AI อยู่ประมาณวันหนึ่ง กว่าน้องจะเรียงลำดับขั้นตอนถูกว่าต้องกดอะไรก่อนหลัง แต่พอนิ่งแล้วก็ทำงานให้เองได้ทุกสัปดาห์ สรุปจากคลิปของช่อง Lin Davoy บทเรียนสำคัญคือ ไม่จำเป็นต้องมีเครื่องมือเดียวที่ตอบโจทย์ทุกอย่าง เลือก stack เครื่องมือให้เหมาะกับแต่ละงาน อย่างในเคสนี้คือ BigSeller รวมข้อมูล Claude ทำหน้าที่แทนคนกดเว็บ และ n8n ส่งรายงาน คุ้มค่ากับเวลาที่ลงทุนไปมากในระยะยาว
🇬🇧 Pull Shopee, TikTok, Lazada Sales Automatically — No More Manual Exports
If you sell on more than one platform, or run more than one store, you know the pain of closing out monthly sales: downloading orders separately from Shopee, Lazada, and TikTok Shop every time. In this video, Lin shares the actual system used in her own shop to pull sales from multiple platforms together without manually clicking “download” every month.
BigSeller consolidates orders, but has no API
The tool already in use is BigSeller, which links to Shopee, Lazada, and TikTok Shop in one place, showing consolidated orders in good detail and letting you export to Excel. The catch: BigSeller has no API for pulling data automatically — you have to log in to the site and click download every time.
Why the old Python script kept breaking
Previously, a data engineer wrote a Python script to open the site, download orders, and push them into SQL automatically. It worked fine for a while, then broke constantly. The cause: these sites frequently show popups or change their UI without warning, and a script hardcoded with static steps has no idea what to do when a popup appears or a button moves — it just fails.
The fix: let Claude drive the browser instead of static code
The fix was switching from a static script to Claude Cowork via the Claude in Chrome extension. Claude logs into BigSeller (keeping the session so it doesn’t need to log in every time), sets the UI language to English, dismisses any popups or notifications that appear, and sets the order date range to 90 days. If pulling 90 days fails due to a Store SKU limitation, it switches to filtering by Order Number instead and retries. All of this is saved as a reusable “skill,” scheduled to run weekly — and because Claude adapts to whatever the page looks like, it doesn’t break the way static code does.
From Excel to a database and dashboard
Once Claude pulls the Excel export, a simple AI-written Python script reads the file and loads it into SQL Server. With the data sitting in a database, you can do anything with it — in this case, Tableau was used for the dashboard because it’s quick to pivot between different views, even though Power BI is the preferred tool overall; the dashboard layout just isn’t finalized yet, so Tableau’s speed for exploring different cuts wins for now.
Automated reporting with n8n
On top of that, n8n pulls from the same SQL database and emails out the report automatically — no more manually building and sending reports every month.
| Tool | Role in this workflow |
|---|---|
| BigSeller | Consolidates orders from Shopee, Lazada, TikTok Shop; exports to Excel |
| Claude (Cowork + Chrome extension) | Logs in and downloads the report in place of a human; runs as a weekly scheduled task |
| Python (AI-written) | Reads the Excel export and loads it into SQL Server |
| Tableau / Power BI | Builds the monthly sales dashboard |
| n8n | Pulls from SQL and emails the report automatically |
The takeaway: no single tool does it all
Getting the skill stable took about a day of back-and-forth with the AI, mainly around getting the click order right. Once it’s stable, though, it runs itself every week. Summarized from the Lin Davoy channel — the key lesson: you don’t need one tool that does everything. Stack the right tool for each job, as in this case: BigSeller for consolidation, Claude standing in for manual clicks, and n8n for delivery. Well worth the setup time in the long run.
ติดตามข่าวสาร Data & AI ได้ที่:
Facebook: https://www.facebook.com/davoytech
YouTube: https://www.youtube.com/@linlinmhee
📌 อย่าลืมกด Like, Share และ Subscribe เป็นกำลังใจให้ด้วยนะคะ!
💬 ร้านของใครขายหลายแพลตฟอร์มบ้าง ตอนนี้ยังสรุปยอดขายด้วยมืออยู่ไหม หรือมีระบบอัตโนมัติของตัวเองแล้ว มาเล่าสู่กันฟังในคอมเมนต์ได้เลยค่ะ
#Davoy #DavoyTech #Linlinmhee #เรียนAI #คอร์สAI #DataAndAI #ClaudeCowork #n8n #TikTokShop #Shopee #Lazada #BigSeller
