Skip to content

feat(google-ads): add google ads integration for campaign and ad performance queries#3360

Open
waleedlatif1 wants to merge 5 commits intostagingfrom
waleedlatif1/google-ads
Open

feat(google-ads): add google ads integration for campaign and ad performance queries#3360
waleedlatif1 wants to merge 5 commits intostagingfrom
waleedlatif1/google-ads

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Add Google Ads integration with 6 tools: list customers, list campaigns, campaign performance, list ad groups, ad performance, custom GAQL query
  • Register OAuth provider in auth.ts, oauth.ts, and oauth-required-modal with adwords scope
  • Add block with operation dropdown, developer token field, wandConfig on GAQL input, and optional fields behind advanced mode
  • Generate docs with manual intro section

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 27, 2026 5:57am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

This PR adds a complete Google Ads integration with 6 tools (list customers, list campaigns, campaign performance, list ad groups, ad performance, and custom GAQL queries). The implementation follows established patterns with proper OAuth setup, input validation, and comprehensive block configuration including AI-assisted query generation via wandConfig.

Key additions:

  • OAuth provider registration with adwords scope across auth.ts, oauth.ts, and oauth-required-modal
  • Six tool implementations with validated GAQL query construction
  • Block configuration with operation dropdown, conditional fields, and advanced mode
  • Comprehensive documentation with manual intro section
  • Input validation functions for IDs, statuses, dates, and date ranges

The code follows project standards with absolute imports, proper type definitions, correct credential visibility settings (hidden for OAuth, user-only for developer token per custom rules), and consistent error handling patterns.

Confidence Score: 5/5

  • This PR is safe to merge with no critical issues found
  • The implementation is well-structured, follows all project patterns and custom instructions, includes proper validation and error handling, and demonstrates thorough attention to security with appropriate credential visibility settings
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/tools/google_ads/types.ts Defines TypeScript types and validation functions for Google Ads API parameters with proper input validation
apps/sim/tools/google_ads/campaign_performance.ts Implements campaign performance tool with validated GAQL query generation and date range handling
apps/sim/tools/google_ads/ad_performance.ts Implements ad performance tool with filtering by campaign/ad group and proper validation
apps/sim/tools/google_ads/search.ts Implements custom GAQL query tool with pagination support and proper search settings
apps/sim/blocks/blocks/google_ads.ts Defines block configuration with operation dropdown, conditional fields, and wandConfig for AI-assisted GAQL query generation
apps/sim/lib/auth/auth.ts Adds google-ads OAuth provider with proper scopes, redirect URI, and user info fetching
apps/sim/lib/oauth/oauth.ts Registers google-ads service in OAuth provider configuration with icon and scopes
apps/sim/tools/registry.ts Registers all six Google Ads tools in the global tools registry

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Start[User selects operation] --> OAuth[Connect Google Ads account]
    OAuth --> Config[Configure parameters]
    Config --> Route{Route by operation}
    Route -->|list_customers| LC[List Customers Tool]
    Route -->|list_campaigns| LCamp[List Campaigns Tool]
    Route -->|campaign_performance| CP[Campaign Performance Tool]
    Route -->|list_ad_groups| LAG[List Ad Groups Tool]
    Route -->|ad_performance| AP[Ad Performance Tool]
    Route -->|search| GS[Custom GAQL Query Tool]
    LC --> Validate[Validate inputs]
    LCamp --> Validate
    CP --> Validate
    LAG --> Validate
    AP --> Validate
    GS --> Validate
    Validate --> BuildQuery[Build GAQL query]
    BuildQuery --> CallAPI[Call Google Ads API]
    CallAPI --> Transform[Transform response]
    Transform --> Output[Return formatted output]
Loading

Last reviewed commit: 129de50

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant