Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • added enrich so

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 1, 2026

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

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

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 1, 2026

Greptile Overview

Greptile Summary

This PR adds comprehensive integration with Enrich.so, a B2B data enrichment and LinkedIn intelligence platform. The implementation includes 30 tools covering person/company enrichment, email finding/verification, LinkedIn data extraction, and post analytics.

Key additions:

  • 30 tool implementations (apps/sim/tools/enrich/) with proper API key handling (user-only visibility)
  • Comprehensive TypeScript types for all request/response schemas (types.ts)
  • Block configuration with 471 lines managing 30 operations, conditional fields, and JSON parameter parsing
  • Complete documentation with usage examples (enrich.mdx)
  • New useUsageHistory React Query hook for infinite scroll pagination
  • All tools properly registered in tool and block registries

Implementation quality:

  • API keys correctly use user-only visibility per custom rule 2851870a-bd1b-44d3-bc5b-1c7e716acec8
  • Proper error handling for async operations (queued responses with 202 status)
  • Consistent use of absolute imports (@/tools/enrich/...) per import guidelines
  • URL parameters properly sanitized with .trim()
  • Response transformation with null-safe fallbacks using nullish coalescing (??)
  • JSON parameter validation with try/catch in block config

Confidence Score: 5/5

  • This PR is safe to merge with no blocking issues found
  • The implementation is well-structured with proper security practices (API key visibility), comprehensive type safety, proper error handling for async operations, and consistent adherence to project conventions. All 30 tools follow the same reliable pattern with no logic errors or security vulnerabilities detected.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/tools/enrich/index.ts Barrel export file consolidating all 30 Enrich.so tool imports and re-exports with consistent naming
apps/sim/blocks/blocks/enrich.ts Block configuration with 30 operations, proper conditional field validation, and JSON parsing for array parameters
apps/sim/tools/enrich/types.ts Comprehensive TypeScript type definitions for all 30 Enrich.so API operations with proper response structures
apps/sim/tools/enrich/email_to_profile.ts Email enrichment tool with proper parameter handling, array mapping for nested objects, and fallback defaults
apps/sim/tools/registry.ts Added 30 Enrich.so tools to global registry with consistent naming convention
apps/sim/blocks/registry.ts Registered Enrich block in alphabetical order in block registry
apps/sim/hooks/queries/usage-history.ts New React Query hook for infinite scroll usage history with proper pagination and filtering
apps/sim/tools/enrich/search_people.ts People search tool with extensive filtering options and proper JSON parameter handling

Sequence Diagram

sequenceDiagram
    participant User
    participant Block as Enrich Block
    participant Registry as Tool Registry
    participant Tool as Enrich Tool
    participant API as Enrich.so API

    User->>Block: Configure operation & API key
    Block->>Block: Validate & parse parameters
    Note over Block: Parse JSON fields<br/>(currentJobTitles, skills, etc.)
    Block->>Block: Map operation to tool name
    Block->>Registry: Lookup tool by ID
    Registry->>Tool: Return tool instance
    Tool->>Tool: Build request URL/body
    Note over Tool: Add Authorization header<br/>Bearer {apiKey}
    Tool->>API: HTTP GET/POST request
    API-->>Tool: JSON response
    Tool->>Tool: Transform response
    Note over Tool: Map API fields to output schema<br/>Handle queued responses (202)
    Tool-->>Block: Return ToolResponse
    Block-->>User: Output data
Loading

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.

8 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit c6357f7 into staging Feb 1, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/tools branch February 1, 2026 05:18
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.

request: {
url: (params) => {
const url = new URL('https://api.enrich.so/v2/api/linkedin-to-email')
url.searchParams.append('linkedin_profile', params.linkedinProfile.trim())
Copy link

Choose a reason for hiding this comment

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

Both LinkedIn email tools use identical API endpoint

High Severity

The linkedInToWorkEmailTool and linkedInToPersonalEmailTool both call the exact same endpoint (https://api.enrich.so/v2/api/linkedin-to-email) with identical parameters. The Enrich.so API documentation shows separate endpoints exist for "Profile URL to Work Email" and "Profile URL to Personal Email". As currently implemented, users selecting the "LinkedIn to Personal Email" operation will actually get work email results (or the same results as work email), making the personal email feature non-functional.

Additional Locations (1)

Fix in Cursor Fix in Web

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