標籤: 自動化

  • MCP Server AI Coding

    如何使用 MCP Server AI Coding 提升清潔業務效率:3 大自動化技巧

    關鍵字:chatgpt, 自動化, json, google sheets, apps script, 清潔業務

    問題:如何正確進行 MCP Server AI Coding?

    解答

    你分享的是一支 YouTube 影片的畫面,標題是:

    《I Built the Ultimate RAG MCP Server for AI Coding (Better than Context7)》
    作者:Cole Medin(12.2 萬訂閱)

    這部影片是在介紹他打造的 RAG MCP Server,聲稱比 Context7 更強大。從畫面與旁邊的文字可推測,這個系統整合了:

    MCP 工具鏈(可能為 Modular Coding Platform)
    – 使用了 Pydantic + Pyodide 技術堆疊
    – 搭配 Deno + Python CLI 執行伺服器
    – 對接了 AI 模型與語意檢索(RAG = Retrieval-Augmented Generation)

    右側顯示的 prompt 設定中有:
    plaintext
    context7.acceptPydanticLibraryID:
    "token": "mcp.server_integration"

    這可能是用於將 Pydantic 模型結構轉換為 MCP 可讀格式的關鍵設定之一。

    影片下方留言由 Context7 的開發者 Enes 留言說明:
    > 他們目前沒有將 Context7 商業化的計畫,但可以考慮高流量用途(如 Cursor、Replit 那類公司級應用)。

    如果你有興趣了解:

    1. 這套 MCP Server 的架構與安裝方式
    2. 如何自架或套用在自己的 VS Code / AI coding workflow 中
    3. 這和你現在用的工具(如 Cursor、Grok、Codeium)有何不同

    我可以幫你詳細解析這支影片的教學步驟與技術堆疊,甚至轉為繁中逐步教學。你想深入哪個部分?

    結論

    透過 MCP Server AI Coding自動化技術 提升效率。

    👉 更多清潔自動化資源

  • Google Sheets JSON 解析

    如何使用 Google Sheets JSON 解析 提升清潔業務效率:3 大自動化技巧

    關鍵字:chatgpt, 自動化, json, google sheets, apps script, 清潔業務

    問題:如何正確進行 Google Sheets JSON 解析?

    解答

    從你提供的截圖來看,你的 Google Sheets 表格中第 5 列出現了一整段未解析的 JSON 資料,直接塞在 Date 欄位(B5)與 title 欄位(C5)中,導致資料格式錯亂。這可能是某個 Webhook 或腳本把原始 JSON 回傳結果原封不動貼上來了,還沒做解析。

    ✅ 解決方式建議:

    你需要將 JSON 格式資料「解析」成欄位結構,對應表格的欄位(idDatetitlequestionanswercategorykeywordspublishedurl)。這可以透過 Google Apps Script 處理。

    🛠 範例 Google Apps Script 解析程式碼:

    1. 開啟 Google Sheets → 點選 擴充功能 → Apps Script
    2. 貼上以下程式碼:

    javascript
    function parseRawJsonData() {
    const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("工作表1");
    const rawData = sheet.getRange("B5").getValue(); // 讀取原始 JSON(這裡是放在 B5)
    const parsed = JSON.parse(rawData)[0];

    // 轉換後資料
    const id = 3;
    const date = new Date(); // 可用 parsed.create_time 轉換時間戳
    const title = parsed.title;
    const question = "ChatGPT 的文字檔或 json 要放到什麼地方來觸發 webhook?"; // 可自行補齊
    const answer = parsed.mapping[Object.keys(parsed.mapping)[1]].message.parts[0];

    // 寫入表格第 5 列(依實際列數調整)
    sheet.getRange("A5").setValue(id);
    sheet.getRange("B5").setValue(date);
    sheet.getRange("C5").setValue(title);
    sheet.getRange("D5").setValue(question);
    sheet.getRange("E5").setValue(answer);
    }
    `

    ---

    ⏭️ 下一步建議:

    - 若你的 JSON 每次都是一個陣列包一個物件,可以用 parsed[0]` 解開。
    – 如果 Webhook 會送出多筆資料,建議用迴圈處理每筆資料並自動往下填寫。
    – 可搭配 Make.com 或 n8n 自動化串接,讓資料每次都自動解析+寫入。

    要我幫你寫出完整版本包含多列自動寫入與時間格式轉換嗎?

    結論

    透過 Google Sheets JSON 解析自動化技術 提升效率。

    👉 更多清潔自動化資源