Read Shopify Community Threads

Site community.shopify.comTask read-community-threadVersion v1Updated Jul 28, 2026Category research

Open a Shopify Community discussion directly and extract its title, authors, timestamps, and post text. This skill was captured from a live agent session on community.shopify.com and publishes here verbatim, exactly as an agent receives it.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Purpose

Read a Shopify Community discussion and return its structured conversation content.

When to Use

Use for any Shopify Community thread when the thread URL or its /t/{slug}/{numeric-id} path is known.

Workflow

  1. Navigate directly to https://community.shopify.com/t/{slug}/{thread-id}. Shopify Community uses Discourse-style thread URLs with an opaque numeric ID; preserve the ID rather than guessing it.
  2. After the page has loaded, run this evaluator once on the current page:
(() => {
  const text = (el) => (el?.innerText || "").replace(/\s+/g, " ").trim();
  const title =
    text(document.querySelector("h1.fancy-title, h1[data-topic-id]")) ||
    text(document.querySelector('meta[property="og:title"]')) ||
    document.title.replace(/\s*[|—-]\s*Shopify Community.*$/i, "").trim();
  const posts = [
    ...document.querySelectorAll(
      ".topic-post[data-post-id], article.topic-post, .topic-post",
    ),
  ]
    .map((post, index) => {
      const author =
        text(
          post.querySelector(
            ".topic-meta-data .names a, .names a.username, a.username",
          ),
        ) || null;
      const timeEl = post.querySelector("time[datetime], .post-date time");
      const body = text(
        post.querySelector(".topic-body .cooked, .cooked, .topic-body"),
      );
      return {
        index: index + 1,
        postId: post.getAttribute("data-post-id") || null,
        author,
        timestamp: timeEl?.getAttribute("datetime") || text(timeEl) || null,
        text: body,
      };
    })
    .filter((post) => post.text);
  return { title, url: location.href, posts };
})();

Site-Specific Gotchas

  • Shopify Community is powered by Discourse; the durable route format is /t/{slug}/{numeric-id}.
  • Do not infer or fabricate the numeric thread ID from the title. If only a topic name is available, resolve it through Shopify Community search first and use the ID from the matching result.
  • A thread can contain multiple post types and nested controls, so extract only .cooked post bodies rather than page-wide text.
  • The page may hydrate posts after initial DOM load; wait for the topic posts to appear before evaluating if the initial result is empty.

Expected Output

Return an object containing the canonical page URL, the thread title, and posts, ordered as displayed. Each post includes its ordinal index, Discourse post ID when present, author, timestamp, and normalized text.

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=community.shopify.com&task=read-community-thread