{
  "schemaVersion": "1.0",
  "item": {
    "slug": "meta-fb-inbox",
    "name": "Facebook Fanpage Inbox for Meta Business Suite",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/PicSeeInc/meta-fb-inbox",
    "canonicalUrl": "https://clawhub.ai/PicSeeInc/meta-fb-inbox",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/meta-fb-inbox",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=meta-fb-inbox",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "_meta.json",
      "README.md",
      "SKILL.md",
      "scripts/read-messages.js",
      "scripts/list-chats.js",
      "scripts/setup.js"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/meta-fb-inbox"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/meta-fb-inbox",
    "agentPageUrl": "https://openagent3.xyz/skills/meta-fb-inbox/agent",
    "manifestUrl": "https://openagent3.xyz/skills/meta-fb-inbox/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/meta-fb-inbox/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Meta Facebook Inbox",
        "body": "⚠️ CRITICAL: Always use profile:\"openclaw\" (isolated browser) for all browser actions. Never use Chrome relay. Keep the same targetId across operations to avoid losing the tab.\n\n⚠️ CONTEXT Management:\n\nSnapshot results are large. Do NOT repeat them in thinking.\nExtract needed info and process immediately.\nPreferred approach: Use snapshot refs:\"aria\" compact:true to find element refs, then act + click/type with ref."
      },
      {
        "title": "Configuration",
        "body": "Before first use, check if config.json exists:\n\nread file_path:\"skills/meta-fb-inbox/config.json\"\n\n⚠️ PATH RULE: Always use workspace-relative paths starting from skills/meta-fb-inbox/. Never use ../ or absolute paths.\n\nIf missing or empty, help the user run the setup wizard:\n\ncd skills/meta-fb-inbox\nnode scripts/setup.js"
      },
      {
        "title": "Config Format",
        "body": "config.json contains a pages array. Each page has an alias (display name) and url (Meta Business Suite inbox URL):\n\n{\n  \"pages\": [\n    {\n      \"alias\": \"fb fanpage\",\n      \"url\": \"https://business.facebook.com/latest/inbox/all/?&asset_id=123456789012345\"\n    },\n    {\n      \"alias\": \"fb fanpage 2\",\n      \"url\": \"https://business.facebook.com/latest/inbox/all/?&asset_id=987654321098765\"\n    }\n  ]\n}"
      },
      {
        "title": "Resolving a Page",
        "body": "When the user asks to check messages:\n\nIf they specify an alias (e.g. \"fb fanpage 2\"), look it up in config.json → pages.\nIf they don't specify, use the first page in the array.\nIf only one page exists, use it directly.\nIf multiple pages exist and no alias given, list available aliases and ask which one."
      },
      {
        "title": "Enter Facebook Inbox",
        "body": "This is the first step for all operations below.\n\nCheck and start browser service:\nbrowser action:\"status\"\n\nIf \"running\": false, start the browser service:\nbrowser action:\"start\" profile:\"openclaw\"\n\nWait 2-3 seconds for the service to initialize.\n\n\nRead config to get the target page URL:\nread file_path:\"skills/meta-fb-inbox/config.json\"\n\nResolve the page alias to a URL (see \"Resolving a Page\" above).\n\n\nOpen browser:\nbrowser action:\"open\" profile:\"openclaw\" targetUrl:\"<pageUrl>\"\n\nCapture targetId and url from response.\n\n\nWait for page load:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":3000}\n\n\n\nCheck login state:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"function(){return window.location.href;}\"}\n\n\nIf URL contains business.facebook.com and shows the inbox → logged in, proceed.\nIf redirected to a login page → notify the user they need to log in manually in the OpenClaw browser, then retry.\n\n\n\nProceed with the user's request.\n\n\nClean Up Browser Tabs (after all operations):\na. Open a blank tab:\nbrowser action:\"open\" profile:\"openclaw\" targetUrl:\"about:blank\"\n\nb. Get all tabs:\nbrowser action:\"tabs\" profile:\"openclaw\"\n\nc. Close all tabs except the newest one (about:blank):\nbrowser action:\"close\" profile:\"openclaw\" targetId:\"<your_targetId>\""
      },
      {
        "title": "Quick Check (for cron / automated checks)",
        "body": "Complete flow: open page → screenshot → report.\n\nRead config: read file_path:\"skills/meta-fb-inbox/config.json\" → resolve page URL\nStart browser if needed: browser action:\"start\" profile:\"openclaw\"\nOpen page: browser action:\"open\" profile:\"openclaw\" targetUrl:<pageUrl> → get targetId\nWait: browser action:\"act\" profile:\"openclaw\" targetId:<targetId> request:{\"kind\":\"wait\",\"timeMs\":4000}\nCheck URL to verify login (see step 5 above)\nTake snapshot: browser action:\"snapshot\" profile:\"openclaw\" targetId:<targetId> refs:\"aria\" compact:true\nLook for conversation items in the inbox list. Each conversation typically shows:\n\nCustomer name\nLast message preview\nTimestamp\nUnread indicator (bold text or dot)\n\n\nReport results in format: <name> (<time>) <preview> [未讀/已讀]\nClean up tabs.\n\nIf the snapshot is hard to parse (Meta's DOM is complex), fall back to:\n\nbrowser action:\"screenshot\" profile:\"openclaw\" targetId:<targetId>\n\nThen describe what you see in the screenshot."
      },
      {
        "title": "Check Inbox Messages",
        "body": "Follow \"Enter Facebook Inbox\" steps to get to the inbox page.\nTake a snapshot or screenshot to see the conversation list.\nReport conversations with name, time, preview, and read/unread status."
      },
      {
        "title": "Get URLs for Conversations (取得對話網址 - Simple!)",
        "body": "Why get URLs? Having the direct conversation URL lets you jump straight to a chat later without searching for it again. Saves time when replying.\n\nWhen to get URLs: After listing chats, get URLs for unread conversations or any conversation you might need to access again.\n\n📝 Simple 3-Step Method:\n\nClick into the conversation using the customer name:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"function() { const containers = document.querySelectorAll('div[style*=\\\"position: absolute\\\"]'); for (let container of containers) { const nameEl = container.querySelector('div.x1vvvo52.x1fvot60.xxio538'); if (nameEl && nameEl.textContent.trim() === '<customer_name>') { nameEl.click(); return {clicked: true}; } } return {error: 'not found'}; }\"}\n\nReplace <customer_name> with the actual customer name from your conversation list.\n\n\nWait 2 seconds for page to load and URL to update:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":2000}\n\n\n\nGet the current URL - it's automatically updated!\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"function(){return window.location.href;}\"}\n\n\n\nStore the URL alongside the chat info.\n\n✅ Example URL Format:\n\nhttps://business.facebook.com/latest/inbox/all/?&asset_id=123456789012345&selected_item_id=1234567890&thread_type=FB_MESSAGE\n\nOr with optional mailbox_id:\n\nhttps://business.facebook.com/latest/inbox/all/?&asset_id=123456789012345&mailbox_id=123456789012345&selected_item_id=9876543210&thread_type=FB_MESSAGE\n\n🔍 Understanding the URL:\n\nasset_id = Your Facebook page ID (stays the same)\nselected_item_id = Unique conversation ID (different for each customer)\nthread_type=FB_MESSAGE = Messenger conversation type\nmailbox_id = Optional, may appear for some conversations\n\n💾 How to Use Later:\n\nNext time you need to access this conversation, skip all the searching:\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<saved_conversation_url>\"\n\nWait 2 seconds, and you're in the conversation!\n\n💡 Tip: Get URLs for unread messages during your check routine, store them in a file or memory, and reuse them for instant access.\n\n🔄 Getting Multiple URLs:\n\nIf you need URLs for multiple conversations:\n\nGet URL for first conversation (steps 1-3 above)\nNavigate back to inbox list:\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<pageUrl>\"\n\nWait 2 seconds.\nRepeat for next conversation.\n\nAlternative method (when already in conversation):\nIf you're already viewing a conversation and just need its URL, skip step 1 and directly run step 3 - the URL is already there!"
      },
      {
        "title": "View Specific Conversation",
        "body": "⚡ Fast Path: If you have the conversation URL from \"Get URLs for Conversations\":\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<conversation_url>\"\n\nWait 2 seconds, then skip to step 3.\n\nStandard Path:\n\nFrom the inbox list, find and click the conversation (use snapshot + click by ref).\nWait for messages to load (2-3 seconds).\nTake a screenshot to see the message thread.\nReport the messages with sender, time, and content."
      },
      {
        "title": "Extract Messages with Images",
        "body": "To programmatically read messages:\n\nNavigate to the conversation (if not already there).\n\n\nInject the read-messages script:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"<contents_of_scripts/read-messages.js>\"}\n\nRead the script file:\nread file_path:\"skills/meta-fb-inbox/scripts/read-messages.js\"\n\nAnd pass its entire contents as the fn parameter (wrapped in parentheses).\n\n\nParse the response:\nThe script returns an array of message objects:\n[\n  {\"text\": \"你好\", \"isCustomer\": true, \"hasImage\": false, \"imageUrl\": null},\n  {\"text\": \"[Image]\", \"isCustomer\": true, \"hasImage\": true, \"imageUrl\": \"https://scontent-...\"}\n]\n\n\n\nDownload images (if any):\n⚠️ Default download location: ~/Downloads (do NOT clutter the workspace).\nFor each message with hasImage: true:\ncd ~/Downloads\ncurl -O \"<imageUrl>\"\n\nThe downloaded file will use the original filename from the URL.\nIf you want a custom filename:\ncd ~/Downloads\ncurl -o \"fb-message-$(date +%Y%m%d-%H%M%S).jpg\" \"<imageUrl>\""
      },
      {
        "title": "Reply to a Message",
        "body": "⚡ Fast Path (if you have conversation URL):\n\nIf you already obtained the conversation URL from \"Get URLs for Conversations\" section, skip step 1 and go directly:\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<conversation_url>\"\n\nWait 2 seconds, then proceed to step 2 (Take snapshot to find input box).\n\nStandard Path (when you don't have the URL):\n\nOpen the conversation:\nClick the customer name in the conversation list:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"function() { const containers = document.querySelectorAll('div[style*=\\\"position: absolute\\\"]'); for (let container of containers) { const nameEl = container.querySelector('div.x1vvvo52.x1fvot60.xxio538'); if (nameEl && nameEl.textContent.trim() === '<customer_name>') { nameEl.click(); return {clicked: true}; } } return {error: 'not found'}; }\"}\n\nReplace <customer_name> with the actual customer name.\nWait 2 seconds for the conversation to load.\n\n\nTake a snapshot to find the input box:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for textbox with [active] attribute.\n\n\nType the reply message:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"type\",\"ref\":\"<input_ref>\",\"text\":\"<your_message>\"}\n\nAfter typing, wait 1 second for the send button to appear.\n\n\nTake another snapshot to find the send button:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for a new button near the textbox. The send button appears after you type text (it replaces the \"like\" button).\n\n\nClick the send button:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<send_button_ref>\"}\n\n\n\nVerify the message was sent:\nWait 2 seconds, then take a screenshot or check the conversation list to confirm the message appears."
      },
      {
        "title": "Manage Labels",
        "body": "⚡ Fast Path: If you have the conversation URL, navigate directly:\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<conversation_url>\"\n\nWait 2 seconds, then proceed to the label operations."
      },
      {
        "title": "Remove a Label",
        "body": "Open the conversation (if not already open, and you don't have URL).\n\n\nTake a snapshot to locate the label's remove button:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for the Labels section in the right sidebar (appears before Notes section):\n\nA heading with level=3 (the Labels heading)\nEach label appears as a button element\nInside each label button, there's a nested button with text \"clearLabel\"\nThe clearLabel button is the \"×\" (remove) icon\n\n\n\nClick the clearLabel button:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<clearLabel_ref>\"}\n\nExample from snapshot:\n- heading [level=3] [ref=eAAA]        ← Labels heading\n- button [ref=e949]:                  ← Label button (shows label name)\n    - button \"clearLabel\" [ref=e952]  ← Remove button (THIS ONE!)\n\nClick the clearLabel button (ref=e952) to remove the label.\n\n\nWait for the change to apply:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":1500}\n\n\n\nVerify the label was removed (optional):\nTake a screenshot or snapshot to confirm the label is gone."
      },
      {
        "title": "Add a Label",
        "body": "Open the conversation.\nTake a snapshot to find the label input combobox:\n- combobox \"label\" [ref=eXXX]\n\n\nType the label name:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"type\",\"ref\":\"<combobox_ref>\",\"text\":\"<label_name>\",\"submit\":true}\n\n\nWait and verify."
      },
      {
        "title": "Manage Notes (備註)",
        "body": "⚡ Fast Path: If you have the conversation URL, navigate directly:\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<conversation_url>\"\n\nWait 2 seconds, then proceed to the note operations."
      },
      {
        "title": "Quick Decision Guide (看這裡！)",
        "body": "Question: Do you need to ADD or EDIT a note?\n\nTake a snapshot of the conversation sidebar.\n\n\nLook for the Notes section (usually appears after Labels section).\n\n\nCheck what you see:\n\n\nONLY see a \"Add note\" type button/link (single button, no existing note text)\n→ Contact has NO note → Use \"Add a New Note\" section below.\n\n\nSee an \"Edit\" link + existing note text (usually with timestamp)\n→ Contact has existing note → Use \"Edit an Existing Note\" section below.\n\nSimple rule:\n\nNo note = Add new (only one button visible)\nHas note = Edit existing (edit link + note text visible)\n\nHow to identify in snapshot:\n\nNo note: Look for pattern like button [ref=eXXX] or link [ref=eXXX] with NO paragraph text nearby\nHas note: Look for pattern like link [ref=eXXX] (edit) + link [ref=eYYY] (delete) + paragraph [ref=eZZZ]: \"note text\""
      },
      {
        "title": "Note Structure",
        "body": "The Notes section is located below the Labels section in the right sidebar. There are two states:\n\nNo note exists: You will see a single button or link (typically the \"add note\" action).\nNote exists: You will see:\n\nThe note text (in a paragraph element)\nAn Edit link (usually appears before the note text with timestamp)\nA Delete link (next to edit link)\nSometimes an \"add note\" link (for additional notes, but we prefer single-note approach)\n\nBest Practice: Keep only one note per contact. Use \"Edit\" to update existing notes rather than adding multiple notes.\n\nIn snapshot, look for these patterns:\n\nNo note:\n\n- heading [level=3] [ref=eXXX]     ← Notes heading\n- button [ref=eYYY]                 ← Single \"add note\" button\n\nHas note:\n\n- heading [level=3] [ref=eXXX]     ← Notes heading\n- link [ref=eYYY]                   ← \"add note\" link\n  - text: \"X minutes ago ·\"        ← Timestamp\n  - link [ref=eZZZ]                 ← Edit link (THIS ONE for editing!)\n  - text: \"·\"\n  - link [ref=eAAA]                 ← Delete link\n- paragraph [ref=eBBB]: \"note text\" ← Existing note content"
      },
      {
        "title": "Edit an Existing Note (編輯註記 - Simple Steps for AI)",
        "body": "When to use: Contact already has a note. You will see an Edit link next to existing note text with timestamp.\n\nStep-by-step:\n\nOpen the conversation (click customer name in chat list).\nWait 2 seconds for it to load.\n\n\nTake snapshot to find the Edit button:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for the pattern (Notes section):\n- heading [level=3] [ref=eAAA]           ← Notes heading\n- link [ref=eBBB]                        ← \"add note\" link\n  - text: \"4 hours ago ·\"                ← Timestamp\n  - link [ref=eXXX]                      ← Edit link (THIS ONE!)\n  - text: \"·\"\n  - link [ref=eYYY]                      ← Delete link\n- paragraph [ref=eZZZ]: \"Customer note\" ← Current note\n\nKey: Find the link that appears AFTER the timestamp text and BEFORE the \"·\" separator. That's your Edit button.\n\n\nClick Edit button:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<edit_button_ref>\"}\n\n\n\nWait for edit form:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":1500}\n\n\n\nTake snapshot to find the textbox:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for:\n- textbox [ref=eXXX]: \"Customer note\"  ← Current text (contains existing note)\n- button [ref=eYYY]                     ← Cancel button\n- button [ref=eZZZ]                     ← Delete button\n- button [disabled] [ref=eAAA]          ← Save button (disabled until you change text)\n\nKey: The textbox will have the current note text. The Save button will show [disabled] attribute.\n\n\nClick textbox to focus:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<textbox_ref>\"}\n\n\n\nSelect all existing text (Cmd+A):\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"press\",\"key\":\"Meta+a\"}\n\n\n\nType new text (replaces selected text):\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"type\",\"ref\":\"<textbox_ref>\",\"text\":\"Customer ID: 12345 ✅\"}\n\n\n\nWait for Save button to enable:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":500}\n\n\n\nTake snapshot to find enabled Save button:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for:\n- button [ref=eXXX] [cursor=pointer]:  ← Now enabled! (no [disabled] attribute)\n\nKey: The Save button will now show [cursor=pointer] and will NOT have [disabled] attribute.\n\n\nClick Save:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<save_button_ref>\"}\n\n\n\nWait and verify:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":2000}\n\nTake screenshot to confirm update.\n\nCommon mistakes to avoid:\n\nDon't forget to select all (Cmd+A) before typing — otherwise you append to existing text!\nDon't skip the wait after clicking — buttons need time to load.\nAlways take a fresh snapshot to get new ref numbers."
      },
      {
        "title": "Add a New Note (新增註記 - Simple Steps for AI)",
        "body": "When to use: Contact has NO existing note. You will see ONLY a single button/link (no existing note text).\n\nStep-by-step:\n\nOpen the conversation (click customer name in chat list).\nWait 2 seconds for it to load.\n\n\nTake snapshot to find the \"add note\" button:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for the pattern (Notes section with NO existing note):\n- heading [level=3] [ref=eAAA]  ← Notes heading\n- button [ref=eXXX]             ← Single \"add note\" button (THIS ONE!)\n\nKey: You should see ONLY one button/link under the Notes heading, with NO paragraph element containing note text.\n\n\nClick \"add note\" button:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<button_ref>\"}\n\n\n\nWait for the textbox:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":1500}\n\n\n\nTake snapshot to find the textbox:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for:\n- textbox [ref=eXXX]:              ← Input field (may show \"Hidden Label\")\n  /placeholder: ...                 ← Placeholder text\n- button [ref=eYYY]                 ← Cancel button\n- button [disabled] [ref=eZZZ]     ← Save button (disabled at first)\n\nKey: The textbox might be labeled \"Hidden Label\" or similar. Look for [disabled] attribute on the Save button.\n\n\nType the note text:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"type\",\"ref\":\"<textbox_ref>\",\"text\":\"Customer note text here\"}\n\n\n\nWait for Save button to become enabled:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":500}\n\n\n\nTake snapshot to find the enabled Save button:\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\nLook for:\n- button [ref=eXXX] [cursor=pointer]:  ← Now enabled (no [disabled] attribute!)\n\n\n\nClick Save button:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<save_button_ref>\"}\n\n\n\nWait and verify:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":2000}\n\nTake a screenshot to confirm the note appears in the sidebar.\n\nCommon mistakes to avoid:\n\nDon't skip snapshots — you need the ref numbers!\nDon't reuse old ref numbers — they change every snapshot.\nWait after clicking before taking next snapshot."
      },
      {
        "title": "Delete a Note",
        "body": "Take a snapshot to find the Delete link (appears next to Edit link when a note exists).\nClick the Delete link (the link that appears AFTER the \"·\" separator, next to the Edit link).\nConfirm the deletion if prompted.\n\nIn snapshot:\n\n- link [ref=eXXX]  ← Edit link\n- text: \"·\"\n- link [ref=eYYY]  ← Delete link (THIS ONE!)"
      },
      {
        "title": "Switch Between Pages",
        "body": "If multiple pages are configured:\n\nRead config to see all available pages.\nNavigate to the desired page URL:\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<newPageUrl>\"\n\n\nWait for the page to load."
      },
      {
        "title": "Notes",
        "body": "Meta Business Suite sessions expire periodically; re-login may be required.\nFacebook's DOM structure is complex and changes frequently. Prefer screenshots over DOM parsing when snapshots are unreliable.\nThe inbox URL format: https://business.facebook.com/latest/inbox/all/?&asset_id=<PAGE_ID>\nSome pages may require specific permissions in Meta Business Suite."
      }
    ],
    "body": "Meta Facebook Inbox\n\n⚠️ CRITICAL: Always use profile:\"openclaw\" (isolated browser) for all browser actions. Never use Chrome relay. Keep the same targetId across operations to avoid losing the tab.\n\n⚠️ CONTEXT Management:\n\nSnapshot results are large. Do NOT repeat them in thinking.\nExtract needed info and process immediately.\nPreferred approach: Use snapshot refs:\"aria\" compact:true to find element refs, then act + click/type with ref.\nConfiguration\n\nBefore first use, check if config.json exists:\n\nread file_path:\"skills/meta-fb-inbox/config.json\"\n\n\n⚠️ PATH RULE: Always use workspace-relative paths starting from skills/meta-fb-inbox/. Never use ../ or absolute paths.\n\nIf missing or empty, help the user run the setup wizard:\n\ncd skills/meta-fb-inbox\nnode scripts/setup.js\n\nConfig Format\n\nconfig.json contains a pages array. Each page has an alias (display name) and url (Meta Business Suite inbox URL):\n\n{\n  \"pages\": [\n    {\n      \"alias\": \"fb fanpage\",\n      \"url\": \"https://business.facebook.com/latest/inbox/all/?&asset_id=123456789012345\"\n    },\n    {\n      \"alias\": \"fb fanpage 2\",\n      \"url\": \"https://business.facebook.com/latest/inbox/all/?&asset_id=987654321098765\"\n    }\n  ]\n}\n\nResolving a Page\n\nWhen the user asks to check messages:\n\nIf they specify an alias (e.g. \"fb fanpage 2\"), look it up in config.json → pages.\nIf they don't specify, use the first page in the array.\nIf only one page exists, use it directly.\nIf multiple pages exist and no alias given, list available aliases and ask which one.\nEnter Facebook Inbox\n\nThis is the first step for all operations below.\n\nCheck and start browser service:\n\nbrowser action:\"status\"\n\n\nIf \"running\": false, start the browser service:\n\nbrowser action:\"start\" profile:\"openclaw\"\n\n\nWait 2-3 seconds for the service to initialize.\n\nRead config to get the target page URL:\n\nread file_path:\"skills/meta-fb-inbox/config.json\"\n\n\nResolve the page alias to a URL (see \"Resolving a Page\" above).\n\nOpen browser:\n\nbrowser action:\"open\" profile:\"openclaw\" targetUrl:\"<pageUrl>\"\n\n\nCapture targetId and url from response.\n\nWait for page load:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":3000}\n\n\nCheck login state:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"function(){return window.location.href;}\"}\n\nIf URL contains business.facebook.com and shows the inbox → logged in, proceed.\nIf redirected to a login page → notify the user they need to log in manually in the OpenClaw browser, then retry.\n\nProceed with the user's request.\n\nClean Up Browser Tabs (after all operations):\n\na. Open a blank tab:\n\nbrowser action:\"open\" profile:\"openclaw\" targetUrl:\"about:blank\"\n\n\nb. Get all tabs:\n\nbrowser action:\"tabs\" profile:\"openclaw\"\n\n\nc. Close all tabs except the newest one (about:blank):\n\nbrowser action:\"close\" profile:\"openclaw\" targetId:\"<your_targetId>\"\n\nQuick Check (for cron / automated checks)\n\nComplete flow: open page → screenshot → report.\n\nRead config: read file_path:\"skills/meta-fb-inbox/config.json\" → resolve page URL\nStart browser if needed: browser action:\"start\" profile:\"openclaw\"\nOpen page: browser action:\"open\" profile:\"openclaw\" targetUrl:<pageUrl> → get targetId\nWait: browser action:\"act\" profile:\"openclaw\" targetId:<targetId> request:{\"kind\":\"wait\",\"timeMs\":4000}\nCheck URL to verify login (see step 5 above)\nTake snapshot: browser action:\"snapshot\" profile:\"openclaw\" targetId:<targetId> refs:\"aria\" compact:true\nLook for conversation items in the inbox list. Each conversation typically shows:\nCustomer name\nLast message preview\nTimestamp\nUnread indicator (bold text or dot)\nReport results in format: <name> (<time>) <preview> [未讀/已讀]\nClean up tabs.\n\nIf the snapshot is hard to parse (Meta's DOM is complex), fall back to:\n\nbrowser action:\"screenshot\" profile:\"openclaw\" targetId:<targetId>\n\n\nThen describe what you see in the screenshot.\n\nCheck Inbox Messages\nFollow \"Enter Facebook Inbox\" steps to get to the inbox page.\nTake a snapshot or screenshot to see the conversation list.\nReport conversations with name, time, preview, and read/unread status.\nGet URLs for Conversations (取得對話網址 - Simple!)\n\nWhy get URLs? Having the direct conversation URL lets you jump straight to a chat later without searching for it again. Saves time when replying.\n\nWhen to get URLs: After listing chats, get URLs for unread conversations or any conversation you might need to access again.\n\n📝 Simple 3-Step Method:\n\nClick into the conversation using the customer name:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"function() { const containers = document.querySelectorAll('div[style*=\\\"position: absolute\\\"]'); for (let container of containers) { const nameEl = container.querySelector('div.x1vvvo52.x1fvot60.xxio538'); if (nameEl && nameEl.textContent.trim() === '<customer_name>') { nameEl.click(); return {clicked: true}; } } return {error: 'not found'}; }\"}\n\n\nReplace <customer_name> with the actual customer name from your conversation list.\n\nWait 2 seconds for page to load and URL to update:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":2000}\n\n\nGet the current URL - it's automatically updated!\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"function(){return window.location.href;}\"}\n\n\nStore the URL alongside the chat info.\n\n✅ Example URL Format:\n\nhttps://business.facebook.com/latest/inbox/all/?&asset_id=123456789012345&selected_item_id=1234567890&thread_type=FB_MESSAGE\n\n\nOr with optional mailbox_id:\n\nhttps://business.facebook.com/latest/inbox/all/?&asset_id=123456789012345&mailbox_id=123456789012345&selected_item_id=9876543210&thread_type=FB_MESSAGE\n\n\n🔍 Understanding the URL:\n\nasset_id = Your Facebook page ID (stays the same)\nselected_item_id = Unique conversation ID (different for each customer)\nthread_type=FB_MESSAGE = Messenger conversation type\nmailbox_id = Optional, may appear for some conversations\n\n💾 How to Use Later:\n\nNext time you need to access this conversation, skip all the searching:\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<saved_conversation_url>\"\n\n\nWait 2 seconds, and you're in the conversation!\n\n💡 Tip: Get URLs for unread messages during your check routine, store them in a file or memory, and reuse them for instant access.\n\n🔄 Getting Multiple URLs:\n\nIf you need URLs for multiple conversations:\n\nGet URL for first conversation (steps 1-3 above)\nNavigate back to inbox list:\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<pageUrl>\"\n\nWait 2 seconds.\nRepeat for next conversation.\n\nAlternative method (when already in conversation): If you're already viewing a conversation and just need its URL, skip step 1 and directly run step 3 - the URL is already there!\n\nView Specific Conversation\n\n⚡ Fast Path: If you have the conversation URL from \"Get URLs for Conversations\":\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<conversation_url>\"\n\n\nWait 2 seconds, then skip to step 3.\n\nStandard Path:\n\nFrom the inbox list, find and click the conversation (use snapshot + click by ref).\nWait for messages to load (2-3 seconds).\nTake a screenshot to see the message thread.\nReport the messages with sender, time, and content.\nExtract Messages with Images\n\nTo programmatically read messages:\n\nNavigate to the conversation (if not already there).\n\nInject the read-messages script:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"<contents_of_scripts/read-messages.js>\"}\n\n\nRead the script file:\n\nread file_path:\"skills/meta-fb-inbox/scripts/read-messages.js\"\n\n\nAnd pass its entire contents as the fn parameter (wrapped in parentheses).\n\nParse the response: The script returns an array of message objects:\n\n[\n  {\"text\": \"你好\", \"isCustomer\": true, \"hasImage\": false, \"imageUrl\": null},\n  {\"text\": \"[Image]\", \"isCustomer\": true, \"hasImage\": true, \"imageUrl\": \"https://scontent-...\"}\n]\n\n\nDownload images (if any):\n\n⚠️ Default download location: ~/Downloads (do NOT clutter the workspace).\n\nFor each message with hasImage: true:\n\ncd ~/Downloads\ncurl -O \"<imageUrl>\"\n\n\nThe downloaded file will use the original filename from the URL.\n\nIf you want a custom filename:\n\ncd ~/Downloads\ncurl -o \"fb-message-$(date +%Y%m%d-%H%M%S).jpg\" \"<imageUrl>\"\n\nReply to a Message\n\n⚡ Fast Path (if you have conversation URL):\n\nIf you already obtained the conversation URL from \"Get URLs for Conversations\" section, skip step 1 and go directly:\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<conversation_url>\"\n\n\nWait 2 seconds, then proceed to step 2 (Take snapshot to find input box).\n\nStandard Path (when you don't have the URL):\n\nOpen the conversation:\n\nClick the customer name in the conversation list:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"evaluate\",\"fn\":\"function() { const containers = document.querySelectorAll('div[style*=\\\"position: absolute\\\"]'); for (let container of containers) { const nameEl = container.querySelector('div.x1vvvo52.x1fvot60.xxio538'); if (nameEl && nameEl.textContent.trim() === '<customer_name>') { nameEl.click(); return {clicked: true}; } } return {error: 'not found'}; }\"}\n\n\nReplace <customer_name> with the actual customer name.\n\nWait 2 seconds for the conversation to load.\n\nTake a snapshot to find the input box:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for textbox with [active] attribute.\n\nType the reply message:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"type\",\"ref\":\"<input_ref>\",\"text\":\"<your_message>\"}\n\n\nAfter typing, wait 1 second for the send button to appear.\n\nTake another snapshot to find the send button:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for a new button near the textbox. The send button appears after you type text (it replaces the \"like\" button).\n\nClick the send button:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<send_button_ref>\"}\n\n\nVerify the message was sent:\n\nWait 2 seconds, then take a screenshot or check the conversation list to confirm the message appears.\n\nManage Labels\n\n⚡ Fast Path: If you have the conversation URL, navigate directly:\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<conversation_url>\"\n\n\nWait 2 seconds, then proceed to the label operations.\n\nRemove a Label\n\nOpen the conversation (if not already open, and you don't have URL).\n\nTake a snapshot to locate the label's remove button:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for the Labels section in the right sidebar (appears before Notes section):\n\nA heading with level=3 (the Labels heading)\nEach label appears as a button element\nInside each label button, there's a nested button with text \"clearLabel\"\nThe clearLabel button is the \"×\" (remove) icon\n\nClick the clearLabel button:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<clearLabel_ref>\"}\n\n\nExample from snapshot:\n\n- heading [level=3] [ref=eAAA]        ← Labels heading\n- button [ref=e949]:                  ← Label button (shows label name)\n    - button \"clearLabel\" [ref=e952]  ← Remove button (THIS ONE!)\n\n\nClick the clearLabel button (ref=e952) to remove the label.\n\nWait for the change to apply:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":1500}\n\n\nVerify the label was removed (optional): Take a screenshot or snapshot to confirm the label is gone.\n\nAdd a Label\nOpen the conversation.\nTake a snapshot to find the label input combobox:\n- combobox \"label\" [ref=eXXX]\n\nType the label name:\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"type\",\"ref\":\"<combobox_ref>\",\"text\":\"<label_name>\",\"submit\":true}\n\nWait and verify.\nManage Notes (備註)\n\n⚡ Fast Path: If you have the conversation URL, navigate directly:\n\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<conversation_url>\"\n\n\nWait 2 seconds, then proceed to the note operations.\n\nQuick Decision Guide (看這裡！)\n\nQuestion: Do you need to ADD or EDIT a note?\n\nTake a snapshot of the conversation sidebar.\n\nLook for the Notes section (usually appears after Labels section).\n\nCheck what you see:\n\nONLY see a \"Add note\" type button/link (single button, no existing note text) → Contact has NO note → Use \"Add a New Note\" section below.\n\nSee an \"Edit\" link + existing note text (usually with timestamp) → Contact has existing note → Use \"Edit an Existing Note\" section below.\n\nSimple rule:\n\nNo note = Add new (only one button visible)\nHas note = Edit existing (edit link + note text visible)\n\nHow to identify in snapshot:\n\nNo note: Look for pattern like button [ref=eXXX] or link [ref=eXXX] with NO paragraph text nearby\nHas note: Look for pattern like link [ref=eXXX] (edit) + link [ref=eYYY] (delete) + paragraph [ref=eZZZ]: \"note text\"\nNote Structure\n\nThe Notes section is located below the Labels section in the right sidebar. There are two states:\n\nNo note exists: You will see a single button or link (typically the \"add note\" action).\nNote exists: You will see:\nThe note text (in a paragraph element)\nAn Edit link (usually appears before the note text with timestamp)\nA Delete link (next to edit link)\nSometimes an \"add note\" link (for additional notes, but we prefer single-note approach)\n\nBest Practice: Keep only one note per contact. Use \"Edit\" to update existing notes rather than adding multiple notes.\n\nIn snapshot, look for these patterns:\n\nNo note:\n\n- heading [level=3] [ref=eXXX]     ← Notes heading\n- button [ref=eYYY]                 ← Single \"add note\" button\n\n\nHas note:\n\n- heading [level=3] [ref=eXXX]     ← Notes heading\n- link [ref=eYYY]                   ← \"add note\" link\n  - text: \"X minutes ago ·\"        ← Timestamp\n  - link [ref=eZZZ]                 ← Edit link (THIS ONE for editing!)\n  - text: \"·\"\n  - link [ref=eAAA]                 ← Delete link\n- paragraph [ref=eBBB]: \"note text\" ← Existing note content\n\nEdit an Existing Note (編輯註記 - Simple Steps for AI)\n\nWhen to use: Contact already has a note. You will see an Edit link next to existing note text with timestamp.\n\nStep-by-step:\n\nOpen the conversation (click customer name in chat list). Wait 2 seconds for it to load.\n\nTake snapshot to find the Edit button:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for the pattern (Notes section):\n\n- heading [level=3] [ref=eAAA]           ← Notes heading\n- link [ref=eBBB]                        ← \"add note\" link\n  - text: \"4 hours ago ·\"                ← Timestamp\n  - link [ref=eXXX]                      ← Edit link (THIS ONE!)\n  - text: \"·\"\n  - link [ref=eYYY]                      ← Delete link\n- paragraph [ref=eZZZ]: \"Customer note\" ← Current note\n\n\nKey: Find the link that appears AFTER the timestamp text and BEFORE the \"·\" separator. That's your Edit button.\n\nClick Edit button:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<edit_button_ref>\"}\n\n\nWait for edit form:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":1500}\n\n\nTake snapshot to find the textbox:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for:\n\n- textbox [ref=eXXX]: \"Customer note\"  ← Current text (contains existing note)\n- button [ref=eYYY]                     ← Cancel button\n- button [ref=eZZZ]                     ← Delete button\n- button [disabled] [ref=eAAA]          ← Save button (disabled until you change text)\n\n\nKey: The textbox will have the current note text. The Save button will show [disabled] attribute.\n\nClick textbox to focus:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<textbox_ref>\"}\n\n\nSelect all existing text (Cmd+A):\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"press\",\"key\":\"Meta+a\"}\n\n\nType new text (replaces selected text):\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"type\",\"ref\":\"<textbox_ref>\",\"text\":\"Customer ID: 12345 ✅\"}\n\n\nWait for Save button to enable:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":500}\n\n\nTake snapshot to find enabled Save button:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for:\n\n- button [ref=eXXX] [cursor=pointer]:  ← Now enabled! (no [disabled] attribute)\n\n\nKey: The Save button will now show [cursor=pointer] and will NOT have [disabled] attribute.\n\nClick Save:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<save_button_ref>\"}\n\n\nWait and verify:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":2000}\n\n\nTake screenshot to confirm update.\n\nCommon mistakes to avoid:\n\nDon't forget to select all (Cmd+A) before typing — otherwise you append to existing text!\nDon't skip the wait after clicking — buttons need time to load.\nAlways take a fresh snapshot to get new ref numbers.\nAdd a New Note (新增註記 - Simple Steps for AI)\n\nWhen to use: Contact has NO existing note. You will see ONLY a single button/link (no existing note text).\n\nStep-by-step:\n\nOpen the conversation (click customer name in chat list). Wait 2 seconds for it to load.\n\nTake snapshot to find the \"add note\" button:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for the pattern (Notes section with NO existing note):\n\n- heading [level=3] [ref=eAAA]  ← Notes heading\n- button [ref=eXXX]             ← Single \"add note\" button (THIS ONE!)\n\n\nKey: You should see ONLY one button/link under the Notes heading, with NO paragraph element containing note text.\n\nClick \"add note\" button:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<button_ref>\"}\n\n\nWait for the textbox:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":1500}\n\n\nTake snapshot to find the textbox:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for:\n\n- textbox [ref=eXXX]:              ← Input field (may show \"Hidden Label\")\n  /placeholder: ...                 ← Placeholder text\n- button [ref=eYYY]                 ← Cancel button\n- button [disabled] [ref=eZZZ]     ← Save button (disabled at first)\n\n\nKey: The textbox might be labeled \"Hidden Label\" or similar. Look for [disabled] attribute on the Save button.\n\nType the note text:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"type\",\"ref\":\"<textbox_ref>\",\"text\":\"Customer note text here\"}\n\n\nWait for Save button to become enabled:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":500}\n\n\nTake snapshot to find the enabled Save button:\n\nbrowser action:\"snapshot\" profile:\"openclaw\" targetId:\"<targetId>\" refs:\"aria\" compact:true\n\n\nLook for:\n\n- button [ref=eXXX] [cursor=pointer]:  ← Now enabled (no [disabled] attribute!)\n\n\nClick Save button:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"click\",\"ref\":\"<save_button_ref>\"}\n\n\nWait and verify:\n\nbrowser action:\"act\" profile:\"openclaw\" targetId:\"<targetId>\" request:{\"kind\":\"wait\",\"timeMs\":2000}\n\n\nTake a screenshot to confirm the note appears in the sidebar.\n\nCommon mistakes to avoid:\n\nDon't skip snapshots — you need the ref numbers!\nDon't reuse old ref numbers — they change every snapshot.\nWait after clicking before taking next snapshot.\nDelete a Note\nTake a snapshot to find the Delete link (appears next to Edit link when a note exists).\nClick the Delete link (the link that appears AFTER the \"·\" separator, next to the Edit link).\nConfirm the deletion if prompted.\n\nIn snapshot:\n\n- link [ref=eXXX]  ← Edit link\n- text: \"·\"\n- link [ref=eYYY]  ← Delete link (THIS ONE!)\n\nSwitch Between Pages\n\nIf multiple pages are configured:\n\nRead config to see all available pages.\nNavigate to the desired page URL:\nbrowser action:\"navigate\" profile:\"openclaw\" targetId:\"<targetId>\" targetUrl:\"<newPageUrl>\"\n\nWait for the page to load.\nNotes\nMeta Business Suite sessions expire periodically; re-login may be required.\nFacebook's DOM structure is complex and changes frequently. Prefer screenshots over DOM parsing when snapshots are unreliable.\nThe inbox URL format: https://business.facebook.com/latest/inbox/all/?&asset_id=<PAGE_ID>\nSome pages may require specific permissions in Meta Business Suite."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/PicSeeInc/meta-fb-inbox",
    "publisherUrl": "https://clawhub.ai/PicSeeInc/meta-fb-inbox",
    "owner": "PicSeeInc",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/meta-fb-inbox",
    "downloadUrl": "https://openagent3.xyz/downloads/meta-fb-inbox",
    "agentUrl": "https://openagent3.xyz/skills/meta-fb-inbox/agent",
    "manifestUrl": "https://openagent3.xyz/skills/meta-fb-inbox/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/meta-fb-inbox/agent.md"
  }
}