Agent Workflows
Compare analytics

Compare analytics

Pull and compare performance stats across channels or individual posts.

User intents

"Compare views across my YouTube channels this month." "How did my last 5 posts perform?"

Required information

  • The scope: a workspace overview, a specific channel (connectionId), or a specific post (assignmentId).

Preconditions

  • The relevant channels are connected and have published content with stats available.

Tool sequence

Get the overview

get_stats — workspace-wide aggregate to establish a baseline.

Drill into a channel

get_connection_stats with connectionId, or get_channel_stats for platform-level channel metrics.

Drill into a post

get_post_stats with the post identifier for per-post numbers.

Compare

Collect the figures from the steps above and present the comparison to the user.

Stats reflect what the platform has reported so far and may lag behind real time. Freshly published posts may have little or no data yet.

REST alternative

The stats endpoints back these tools — see the Stats reference.

Recovery paths

  • Empty stats — the post is too new or the platform has not reported data yet; tell the user to check back later.
  • 404 not found — verify the connectionId/assignmentId via list_connections or list_assignments.
  • Token expired — re-authorize the connection before stats can refresh.

Example prompt → result

"Compare total views between my two YouTube channels this month."

Result: the agent fetches per-channel stats and returns a side-by-side comparison.

Common mistakes

  • Comparing across platforms with incompatible metrics without noting the difference.
  • Treating freshly published posts' empty stats as zero performance.

Related docs

Tool reference · Publish now