Build Automated Business Reports With AI (Works With Google Analytics, YouTube, Shopify & More)

Learn how to connect Codex or Claude Code to business tools through Composio, inspect the available data, generate a Markdown report, and turn the process into a reusable automation.

  • Beginner
  • 8 steps
  • By The Rundown University

In this guide, you will learn how to connect Codex (or Claude Code) to Google Analytics with a free tool called Composio. You will use simple prompts to explore your data and build a useful Markdown report that you can schedule to run weekly.

Step by step 8 steps

  1. Step 1 of 8

    Sign Up for Composio and Connect a Toolkit

    Open Composio and connect the data source you want to use. In this guide, we use the Google Analytics toolkit, but the same pattern works for YouTube, Shopify, HubSpot, Google Sheets, and other business apps.

    From the Composio dashboard, find the Google Analytics toolkit (https://dashboard.composio.dev/billy_workspace/~/connect/apps/google_analytics) and connect the Google account that has access to the property you want to report on.

    If you are using a different source, replace Google Analytics with the toolkit you want to report from. The important part is that Composio handles the app login and gives your agent a consistent way to access that data.

    Before you move on, confirm the toolkit shows as connected.

  2. Step 2 of 8

    Install the Composio Script for Codex or Claude Code

    Next, connect Composio to your agent.

    composio codex cli install

    For Codex, Composio provides a setup prompt that installs the Composio CLI and logs in with your generated key. Copy that setup prompt into a new Codex session, or run the install and login commands yourself in Terminal.

    In the recording, the CLI path worked well because Codex and Claude Code are already comfortable with command-line tools. MCP can work too, but the CLI setup is often easier for agents to inspect, run, and debug.

    After installation, restart your Codex or Claude Code session and run a small test. For example:

    Use the Composio CLI tool to list my three most recent Google Sheets files.

    The exact test can change based on the connector. The goal is to prove the agent can call Composio before you ask it for a real report.

    Pro tip: Composio's Enhanced Control settings are the data protection layer to check before you hand an agent a real account. They let you decide what an agent can do with a connected toolkit. For reporting workflows, start with read-only access when possible. Be careful with write and destructive tools on production accounts.
    enhanced control permissions

  3. Step 3 of 8

    Ask the Agent to Explore Before It Reports

    Do not start by asking for the finished report.

    Start by asking the agent to inspect what it can see. This saves time because agents often need to discover the right account, property, channel, store, dimensions, metrics, and permissions before they can build a useful report.

    Use this generic prompt first:

    Use Composio to explore the connected [TOOLKIT] toolkit.
    
    Do not create a report yet.
    
    Return:
    - which accounts, properties, channels, stores, workspaces, or data sources you can see
    - which source looks most relevant for [BUSINESS_OR_REPORTING_GOAL]
    - which dimensions, metrics, fields, or records would be useful for a [LOOKBACK_DAYS]-day report
    - any missing access, ambiguity, or risky permissions I should resolve before reporting

    For Google Analytics, that becomes:

    Use the Composio CLI tool to inspect our Google Analytics setup.
    
    Identify the available accounts and properties, find the property that tracks [SITE_OR_APP], and tell me which dimensions and metrics you would use for a useful traffic report.
    
    Do not create the report yet.

    For a more detailed version, use:

    Use Composio to explore the connected Google Analytics account.
    
    Find the Analytics property that appears to track [SITE_OR_APP].
    Do not create a report yet.
    
    First return:
    - which accounts/properties you can see
    - which property looks correct
    - which dimensions and metrics you would use for a 30-day page/source report
    - any missing access or ambiguity I need to resolve
    codex explore data source

    The same exploration prompt works for other tools. For YouTube, ask the agent to identify the connected channel, the available channel or video metrics, and the best KPIs for a weekly content report. For Shopify, ask it to inspect products, orders, promotions, and sell-through metrics before it creates anything.

  4. Step 4 of 8

    Analyze the Data and Create the Markdown Report

    Once the agent confirms the right property or data source, give it the actual reporting job.

    Use this generic report prompt:

    Use Composio and the confirmed [TOOLKIT] data source to create a [LOOKBACK_DAYS]-day report.
    
    Report goal:
    [REPORT_GOAL]
    
    Analyze the data and pull the most important trends, changes, risks, and opportunities.
    
    Return the report in Markdown with:
    - executive summary
    - supporting tables
    - most important trends
    - recommended actions
    - source notes
    - access or data quality warnings

    For Google Analytics, a simple version is:

    Use Composio + GA to identify the three most important trends over the last 90 days.
    
    Return a Markdown report with an executive summary, supporting tables, source notes, and recommended actions.

    For a more specific page/source report, use this:

    Use Composio and Google Analytics to create a report for the past 30 days.
    
    Scope:
    - Site or app: [SITE_OR_APP]
    - Pages: only pages under [PATH_PREFIX]
    - Questions:
      1. Which pages had the most traffic?
      2. What were the main traffic sources for those pages?
      3. Which pages look under-distributed or worth promoting again?
    
    Output:
    - Executive summary
    - Table of top pages
    - Table of traffic sources by top page
    - 3 recommended actions
    - Source/tool notes

    Markdown should be the default first output. Terminal tables are useful while you are working, but Markdown gives you something you can keep, edit, send, and convert. If the report needs to become a PDF, spreadsheet, or website later, you can ask the agent to build from the Markdown.

    Pro tip: If you want to build charts, spreadsheets, or deeper visualizations later, ask the agent to save the underlying rows as a CSV too. You do not need that for the first version of the guide, but it is useful when the report becomes a recurring workflow.

  5. Step 5 of 8

    Visualize the Report

    After the Markdown report looks right, ask the agent to turn it into a handoff-ready format.

    Use a prompt like this:

    Use the Markdown report to create a [OUTPUT_FORMAT] report for [AUDIENCE].
    
    Focus on:
    - the top findings
    - the most important chart or table
    - the business recommendation
    - source notes
    
    Keep the output clean and readable.

    For example, the same Markdown report can become a simple PDF traffic snapshot with summary cards and a ranked table.

    final pdf report preview

    You can also ask for a spreadsheet:

    Create a spreadsheet version of this Markdown report with one tab for summary, one tab for the key table, and one tab for recommended actions.

    Or ask for an internal website:

    Build a simple local HTML report from the Markdown report. Include the executive summary, the main table, trend notes, and recommended actions.

  6. Step 6 of 8

    Turn the Analysis and Visualization Into Skills

    Once the workflow works once, do not leave it as a one-off chat.

    Ask Codex or Claude Code to turn the process into a reusable skill:

    Create a reusable reporting skill from the analysis and visualization process we just used.
    
    Important:
    - Do not include the initial data-source exploration step in this skill.
    - Assume I have already confirmed the right toolkit and data source.
    - Make the skill work with any Composio toolkit, not only Google Analytics.
    
    The skill should let me provide:
    - toolkit name
    - confirmed data source or account
    - date range
    - report goal
    - desired output format
    
    It should:
    1. Run the report using the confirmed Composio data source.
    2. Analyze and pull the most important trends, changes, risks, and opportunities.
    3. Save the main report as Markdown.
    4. Optionally create a PDF, spreadsheet, or HTML report from the Markdown.
    5. Include source notes, access errors, and privacy warnings.

    You can keep analysis and visualization in one skill, or split them. Splitting is often better for recurring work:

    • one skill creates the Markdown analysis report
    • one skill turns an approved Markdown report into a PDF, spreadsheet, or website

    That way you can schedule the analysis every week, then only run the visualization skill when the report needs to be shared.

    If you do split them, use this second prompt:

    Create a separate visualization skill.
    
    Input:
    - a Markdown business report
    - desired output format
    - audience
    
    The skill should convert the Markdown report into a clean [PDF_OR_SPREADSHEET_OR_HTML] version without re-running the data analysis.

  7. Step 7 of 8

    Schedule the Report as an Automation

    After the skill works, grab the skill name(s) and create a new automation with this prompt:

    Use [ANALYSIS_SKILL_NAME] to create a [LOOKBACK_DAYS]-day report.
    
    Scope:
    - Toolkit: [TOOLKIT]
    - Confirmed data source: [DATA_SOURCE_OR_ACCOUNT]
    - Business area or report scope: [REPORT_SCOPE]
    - Report goal: [REPORT_GOAL]
    
    Output:
    - Markdown report first
    - source notes
    - access errors
    - recommended actions
    
    If [VISUALIZATION_SKILL_NAME] is provided, run that skill after the Markdown report is complete and create a [OUTPUT_FORMAT] version for [AUDIENCE].

    For a Google Analytics weekly report, that might become:

    Use the business-report-analysis skill to create a 7-day report.
    
    Scope:
    - Toolkit: Google Analytics
    - Confirmed data source: RU main site
    - Business area or report scope: app.therundown.ai/guides
    - Report goal: identify the most important page traffic trends and traffic source changes
    
    Output:
    - Markdown report first
    - source notes
    - access errors
    - recommended actions
    
    Then use the business-report-visualization skill to create a PDF version for the marketing team.

    In Codex, the automation setup should look something like this:

    codex report automation

    Run it weekly for a normal content or marketing report. Run it daily only when someone will actually review it daily. For monthly reporting, change [LOOKBACK_DAYS] to 30. For quarterly reporting, change it to 90.

  8. Step 8 of 8

    Going Further

    Once this works for Google Analytics, use the same Explore, Analyze, Visualize framework on other business systems.

    Try prompts like:

    Use Composio to audit the available toolkits connected to this workspace.
    
    Based on what you know about my work, recommend five data sources that could produce useful recurring business reports.
    
    For each one, suggest:
    - what report to build
    - what data to inspect first
    - what metrics matter
    - what output format would be useful
    - how often the report should run

    You can use the same pattern for:

    • YouTube channel and video performance
    • Shopify product and promotion reports
    • HubSpot pipeline and lead source reports
    • Google Sheets operational dashboards
    • Gmail or support inbox trend reports
    • Notion project or content pipeline reports

That's the whole workflow

Mark it complete to keep your progress. The background follows.

Keep learning with Rundown Pro

Guides stay free. This is what Rundown Pro adds:

  • Every course and recording
  • The Rundown Certified Operator program
  • Member perks

$29/mo, cancel anytime

Background and context

Who This Is Useful For

  • Marketing operators who want fast weekly reports from Google Analytics, YouTube, Shopify, or HubSpot without building custom dashboards from scratch.
  • Founders and small teams who need practical business reporting, but do not want to create Google Cloud projects, manage OAuth, or write API scripts.
  • AI power users and automation builders who want Codex or Claude Code to produce repeatable reports from real data sources instead of static exports.

What You Will Build

terminal google analytics report

You will build an agent-powered reporting workflow that connects to Google Analytics through Composio, explores the available account and property, creates a Markdown report, and prepares the process for automation.

What You Need

  • A Composio (https://composio.dev/) account
  • Codex, Claude Code, or another coding agent that can run CLI tools
  • Access to the business app you want to report from
  • For this demo: access to the right Google Analytics property
  • A folder where the agent can save the outputs

You can use Google Analytics as the first test, but the workflow works best when you think of it as a general reporting pattern. Start with one connected source, prove the report works, then expand.