Conversation
fix(cancel-subscription): cancel subscription needs reference id
* prevent save password on usage limit change * prevent more password managers from appearing
improvement(gmail): added gmail draft operation
improvement(trace-span): make tool calls separately collect in the tracespan
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
PR Summary
Major v0.2.12 release with security enhancements and Gmail improvements focusing on UX and functionality improvements.
- Added separate
STRIPE_BILLING_WEBHOOK_SECRETenvironment variable inapps/sim/lib/env.tsfor improved webhook security - Implemented Gmail draft functionality in
apps/sim/tools/gmail/draft.tsallowing emails to be saved without sending - Fixed security issue with password managers incorrectly triggering on numeric inputs across multiple components by adding proper input attributes
- Fixed double scrollbar visual bug in
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/long-input.tsx - Improved developer experience by updating pre-commit hook to use lint-staged with automatic fixes
16 files reviewed, 4 comments
Edit PR Review Bot Settings | Greptile
| ### `gmail_draft` | ||
|
|
||
| Read emails from Gmail | ||
| Draft emails using Gmail | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
| | `accessToken` | string | Yes | Access token for Gmail API | | ||
| | `messageId` | string | No | ID of the message to read | | ||
| | `folder` | string | No | Folder/label to read emails from | | ||
| | `unreadOnly` | boolean | No | Only retrieve unread messages | | ||
| | `maxResults` | number | No | Maximum number of messages to retrieve \(default: 1, max: 10\) | | ||
| | `to` | string | Yes | Recipient email address | | ||
| | `subject` | string | Yes | Email subject | | ||
| | `body` | string | Yes | Email body content | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | | ||
| | --------- | ---- | | ||
| | `content` | string | | ||
| | `metadata` | string | | ||
|
|
||
| ### `gmail_search` | ||
|
|
||
| Search emails in Gmail | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
| | `accessToken` | string | Yes | Access token for Gmail API | | ||
| | `query` | string | Yes | Search query for emails | | ||
| | `maxResults` | number | No | Maximum number of results to return | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | | ||
| | --------- | ---- | | ||
| | `content` | string | | ||
| | `message` | string | | ||
| | `threadId` | string | | ||
| | `labelIds` | string | | ||
|
|
There was a problem hiding this comment.
style: Documentation for gmail_draft operation matches the send operation's parameters exactly. Consider documenting any draft-specific parameters or behaviors that differentiate it from send.
| body: (params: GmailSendParams): Record<string, any> => { | ||
| const email = [ | ||
| 'Content-Type: text/plain; charset="UTF-8"', | ||
| 'MIME-Version: 1.0', | ||
| `To: ${params.to}`, | ||
| `Subject: ${params.subject}`, | ||
| '', | ||
| params.body, | ||
| ].join('\n') | ||
|
|
||
| return { | ||
| message: { | ||
| raw: Buffer.from(email).toString('base64url'), | ||
| }, | ||
| } | ||
| }, |
There was a problem hiding this comment.
style: Move email construction logic into a separate function for better maintainability and reusability between send and draft operations
| return { | ||
| message: { | ||
| raw: Buffer.from(email).toString('base64url'), | ||
| }, | ||
| } |
There was a problem hiding this comment.
style: Add type for message object instead of using Record<string, any>
| accessToken: { | ||
| type: 'string', | ||
| required: true, | ||
| description: 'Access token for Gmail API', | ||
| }, | ||
| to: { | ||
| type: 'string', | ||
| required: true, | ||
| description: 'Recipient email address', | ||
| }, | ||
| subject: { | ||
| type: 'string', | ||
| required: true, | ||
| description: 'Email subject', | ||
| }, | ||
| body: { | ||
| type: 'string', | ||
| required: true, | ||
| description: 'Email body content', | ||
| }, | ||
| }, |
There was a problem hiding this comment.
style: Consider grouping to, subject, and body into an emailOptions object parameter
|
✅ No security or compliance issues detected. Reviewed everything up to 36eb04d. Security Overview
Detected Code Changes
Reply to this PR with |
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist:
bun run test)Security Considerations:
Additional Information:
Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.