Skip to content

refactor(resend-slack-email-agent): use the Resend SDK for inbox threads and replies - #170

Open
jackbridger wants to merge 1 commit into
triggerdotdev:mainfrom
jackbridger:resend-agent-sdk
Open

jackbridger wants to merge 1 commit into
triggerdotdev:mainfrom
jackbridger:resend-agent-sdk

Conversation

@jackbridger

@jackbridger jackbridger commented Nov 24, 2026 •

Copy link
Copy Markdown

Switches the Resend email agent example from hand-written fetch calls to the official Resend SDK (resend 6.39) for its two Inboxes calls:

  • reading a thread: resend.inboxes.threads.emails.list
  • replying in it: resend.inboxes.threads.emails.reply, with the SDK's idempotencyKey option, so a retried run still sends each reply at most once

The client is created on first use, so the task files still load when RESEND_API_KEY isn't set. The README's file list now mentions the SDK.

Testing: pnpm run typecheck passes. With fetch stubbed, the SDK sends the same requests as before: GET /inboxes/{inbox}/threads/{thread}/emails?limit=100, and POST .../emails/{email}/reply with the same body and Idempotency-Key header. Not run against a live inbox.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated the integration guide to describe reading email threads and sending replies through Resend, alongside Slack API communication.
  • Integration Updates
    • Email thread retrieval and replies now use the Resend SDK. Replies continue to support idempotency, and missing API credentials or SDK errors are reported. These changes update the underlying email integration; no new user-facing capabilities are described.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Resend integration now uses the Resend SDK to list thread emails and send replies. It creates and caches the client on first use, paginates email results, and throws when the SDK reports an error. The package adds the SDK dependency, and the README updates its descriptions of the Resend and Slack integrations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to b34ae · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the refactor, the affected example (resend-slack-email-agent), and the main change: moving inbox thread reads and replies to the Resend SDK. The raw summary and PR objectives both conf…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the refactor, the affected example (resend-slack-email-agent), and the main change: moving inbox thread reads and replies to the Resend SDK. The raw summary and PR objectives both confirm that replacing hand-written fetch calls with SDK calls (threads.emails.list and threads.emails.reply) is the primary change. The title is specific and concise, and it fits the changeset.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7432bdf9-6ba7-4ff4-886a-ff68013930f9
Commits

Reviewing files that changed from the base of the PR and between 254ba91 and b34ae1d.

Files ignored due to path filters: 1

  • resend-slack-email-agent/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 3

  • resend-slack-email-agent/README.md
  • resend-slack-email-agent/package.json
  • resend-slack-email-agent/src/trigger/resend.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

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