Skip to content

feat(resend): expand integration with contacts, domains, and enhanced email ops#3366

Merged
waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1/resend-integration
Feb 27, 2026
Merged

feat(resend): expand integration with contacts, domains, and enhanced email ops#3366
waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1/resend-integration

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Add 7 new Resend operations: get email, create/list/get/update/delete contacts, list domains
  • Enhance send email with cc, bcc, reply-to, scheduled send, and tags support
  • Add operation dropdown to block with conditional fields per operation
  • Default operation is send_email for full backwards compatibility

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:56am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

Expanded the Resend integration from a single send email operation to a comprehensive suite of 8 operations covering email sending, retrieval, contact management, and domain listing.

Key Changes:

  • Enhanced send email with cc, bcc, reply-to, scheduled sending, and tags support
  • Added operation dropdown to block with conditional field rendering per operation
  • Implemented 7 new operations: get email, create/list/get/update/delete contacts, list domains
  • Maintained full backwards compatibility with send_email as the default operation
  • ISO 8601 datetime validation added for scheduled sends
  • Tag parsing properly handles values containing colons using indexOf and substring
  • Comprehensive documentation added for all new operations

Architecture:
The implementation follows established patterns with each operation as a separate tool config file, proper TypeScript typing, snake_case to camelCase mapping for API responses, and user-only visibility for API keys per project guidelines.

Confidence Score: 4/5

  • This PR is safe to merge with minor validation concerns already noted in previous review
  • Score reflects well-structured implementation with comprehensive new operations, proper backwards compatibility, and consistent patterns. Previous review identified validation concerns (email format, array support for to field) that remain unaddressed but don't block core functionality. All new operations follow project conventions, type safety is maintained, and documentation is thorough.
  • Pay attention to apps/sim/app/api/tools/mail/send/route.ts - validation concerns from previous review regarding email format and array support for the to field

Important Files Changed

Filename Overview
apps/sim/app/api/tools/mail/send/route.ts Added new email fields (cc, bcc, replyTo, scheduledAt, tags); validation relaxed for email addresses; previous review noted validation concerns
apps/sim/blocks/blocks/resend.ts Added operation dropdown with 8 operations; conditional fields per operation; proper backwards compatibility with send_email default
apps/sim/tools/resend/send.ts Enhanced with cc, bcc, replyTo, scheduledAt, and tags parameters; proper user-only visibility for API key
apps/sim/tools/resend/types.ts Comprehensive TypeScript types for all operations; well-structured with proper param/result interfaces

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Resend Block] --> B{Operation Dropdown}
    B -->|send_email| C[Send Email Route]
    B -->|get_email| D[Get Email Tool]
    B -->|create_contact| E[Create Contact Tool]
    B -->|list_contacts| F[List Contacts Tool]
    B -->|get_contact| G[Get Contact Tool]
    B -->|update_contact| H[Update Contact Tool]
    B -->|delete_contact| I[Delete Contact Tool]
    B -->|list_domains| J[List Domains Tool]
    
    C --> K[Validate Params]
    K --> L{ContentType?}
    L -->|html| M[Set HTML + Text]
    L -->|text| N[Set Text Only]
    M --> O[Add Optional Fields]
    N --> O
    O --> P{Tags Present?}
    P -->|yes| Q[Parse Tags with indexOf/substring]
    P -->|no| R[Build Email Data]
    Q --> R
    R --> S[Resend API: Send Email]
    
    D --> T[Resend API: GET /emails/:id]
    E --> U[Resend API: POST /contacts]
    F --> V[Resend API: GET /contacts]
    G --> W[Resend API: GET /contacts/:id]
    H --> X[Resend API: PATCH /contacts/:id]
    I --> Y[Resend API: DELETE /contacts/:id]
    J --> Z[Resend API: GET /domains]
    
    S --> AA[Return Success + Email ID]
    T --> AB[Return Email Details]
    U --> AC[Return Contact ID]
    V --> AD[Return Contacts Array]
    W --> AE[Return Contact Details]
    X --> AF[Return Updated Contact ID]
    Y --> AG[Return Deleted Status]
    Z --> AH[Return Domains Array]
Loading

Last reviewed commit: 350d864

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.

14 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/resend-integration branch from a6a0759 to 3b3913b Compare February 27, 2026 02:33
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/resend-integration branch from 3b3913b to 6fcc661 Compare February 27, 2026 02:41
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/resend-integration branch from 6fcc661 to 02d818b Compare February 27, 2026 02:55
@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/resend-integration branch from 02d818b to 529d5ed Compare February 27, 2026 05:47
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/resend-integration branch from 529d5ed to e77cafa Compare February 27, 2026 05:51
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/resend-integration branch from e77cafa to 350d864 Compare February 27, 2026 05:53
@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit 47fef54 into staging Feb 27, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/resend-integration branch February 27, 2026 06:12
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