Skip to content

feat(google books): Add google books integration#3210

Merged
TheodoreSpeaks merged 4 commits intostagingfrom
feat/google-books
Feb 13, 2026
Merged

feat(google books): Add google books integration#3210
TheodoreSpeaks merged 4 commits intostagingfrom
feat/google-books

Conversation

@TheodoreSpeaks
Copy link
Collaborator

Summary

Add integration for Google Books API.
Created new Google Books block with two operations:

  • Search Volumes: Given a query, fetch relevant volumes related to the query.
  • Get Volume Details: Given a google book id, fetch metadata related to that volume.

No triggers were applicable for this API.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

For both:

  • Created sample workflow with a search volume operation followed by a for loop, fetching volume details for each book.
    Validated API returned successfully and iterated through each book id with no errors.

Get volume details:

  • Tested using invalid book id. Note that google api directly returns 503 service temporarily down, this is not a fault of error handling
  • Tested using invalid API key. Validated error message, triggers error condition

Search volumes

  • Tested using improper values for maxResults, api keys. Validated error message, triggers error condition.
  • Tested using invalid API key. Validated error message, triggers error condition
  • Tested different parameters for filter, print type, order by, max results, validated books return correct results.

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)

Screenshots/Videos

image

@vercel
Copy link

vercel bot commented Feb 12, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Feb 12, 2026 11:45pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 12, 2026

Greptile Overview

Greptile Summary

Implements Google Books API integration with two operations: volume search and volume details retrieval. The implementation follows the project's integration patterns with proper structure, typing, documentation, and registration.

Key Changes

  • Created tools/google_books/ with volume_search.ts and volume_details.ts tools
  • Added blocks/blocks/google_books.ts with dropdown operation selector and conditional fields
  • Registered tools and block in respective registries
  • Added GoogleBooksIcon component to both apps/sim and apps/docs
  • Created comprehensive documentation in apps/docs/content/docs/en/tools/google_books.mdx

Issues Found

  • Missing error handling: Both tool files lack error checking for API failures. Google Books API returns error.code and error.message when requests fail (invalid credentials, quota exceeded, etc.). Similar integrations like Google Maps include this validation.
  • Missing authMode: Block config missing authMode: AuthMode.ApiKey property, inconsistent with other API key-based blocks like Google Search
  • Scope issue: The projection field in block config isn't conditionally scoped to the volume_details operation

Confidence Score: 3/5

  • Safe to merge after addressing error handling issues, but testing with invalid inputs is recommended
  • The implementation follows project conventions well with proper structure, typing, and documentation. However, the missing error handling in both tool files means API failures won't be gracefully handled, potentially causing unclear error messages for users. The missing authMode property is a minor metadata issue that should be fixed for consistency.
  • Pay close attention to apps/sim/tools/google_books/volume_search.ts and apps/sim/tools/google_books/volume_details.ts - both need error handling before merge

Important Files Changed

Filename Overview
apps/sim/tools/google_books/volume_search.ts Implements volume search tool with proper params and response transformation, but missing error handling for API failures
apps/sim/tools/google_books/volume_details.ts Implements volume details tool with proper params and response transformation, but missing error handling for API failures
apps/sim/tools/google_books/types.ts Clean type definitions with proper TypeScript interfaces for params and responses
apps/sim/blocks/blocks/google_books.ts Block config implementation with proper subBlocks and tool config, but missing authMode property and projection field lacks condition
apps/sim/blocks/registry.ts Correctly registered google_books block in alphabetical order
apps/sim/tools/registry.ts Correctly registered both google_books tools in alphabetical order

Sequence Diagram

sequenceDiagram
    participant User
    participant Block as Google Books Block
    participant Tool as Google Books Tool
    participant API as Google Books API

    User->>Block: Configure operation (volume_search/volume_details)
    User->>Block: Enter credentials and parameters
    Block->>Tool: Execute google_books_{operation}
    Tool->>API: GET /books/v1/volumes with query params
    alt Success
        API-->>Tool: 200 OK with volumes data
        Tool-->>Block: Return volume list or details
        Block-->>User: Display results
    else API Error
        API-->>Tool: Error response with error.message
        Tool-->>Block: Throw error
        Block-->>User: Show error message
    end
Loading

Last reviewed commit: 6c006cd

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.

12 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator

nice @TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks merged commit 9a06cae into staging Feb 13, 2026
11 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the feat/google-books branch February 13, 2026 00:18
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.

2 participants