Skip to content

improvement(forwarding+excel): added forwarding and improve excel read#1136

Merged
icecrasher321 merged 7 commits intostagingfrom
improvement/outlook
Aug 27, 2025
Merged

improvement(forwarding+excel): added forwarding and improve excel read#1136
icecrasher321 merged 7 commits intostagingfrom
improvement/outlook

Conversation

@aadamgough
Copy link
Contributor

@aadamgough aadamgough commented Aug 26, 2025

Summary

Added forward email in outlook and improved reading excel sheets when user inputs no range.

Type of Change

  • New feature

Testing

Tested by forwarding emails to different addresses. Tested by adding excel sheets without ranges and just the excel sheet name.

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

Screen.Recording.2025-08-26.at.4.30.45.PM.mov

@vercel
Copy link

vercel bot commented Aug 26, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Aug 27, 2025 3:32am
sim Ready Ready Preview Comment Aug 27, 2025 3:32am

@vercel vercel bot temporarily deployed to Preview – docs August 26, 2025 20:15 Inactive
@aadamgough aadamgough marked this pull request as ready for review August 26, 2025 20:51
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.

Greptile Summary

This PR adds email forwarding functionality to the Outlook integration, completing the email management capabilities alongside existing send, draft, and read operations. The implementation follows established patterns in the codebase by creating a new outlookForwardTool that integrates with Microsoft Graph API's forward endpoint.

The changes span multiple layers of the architecture:

  • Core tool implementation: A new forward.ts file defines the tool configuration with OAuth authentication, parameter validation, and API integration
  • Type definitions: New interfaces OutlookForwardParams and OutlookForwardResponse extend the existing Outlook type system
  • Block integration: The Outlook block configuration now includes a "Forward Email" operation with conditional input fields for message ID and optional comments
  • Registry updates: The new tool is properly registered in both the tools index and main registry for discoverability
  • Infrastructure improvements: Enhanced error handling in the core request handler to support Microsoft Graph API's HTTP 202 responses for async operations

The forward tool requires a messageId to identify the email to forward, recipient email addresses in the to parameter, and accepts an optional comment to include with the forwarded message. The implementation uses the same OAuth provider (outlook) and follows the consistent ToolConfig pattern used throughout the email tools.

Additionally, the PR includes an unrelated improvement to the Microsoft Excel read tool, adding support for sheet-only range inputs (e.g., Sheet1 without explicit cell ranges) and fixes an inconsistency in the Outlook read tool's output schema to align with its actual response format.

Confidence score: 3/5

  • This PR has several implementation issues that need attention before merging
  • Score reflects concerns about response handling inconsistencies and missing validation in the forward tool
  • Pay close attention to apps/sim/tools/outlook/forward.ts for response structure mismatches and error handling gaps

8 files reviewed, 5 comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs August 26, 2025 21:03 Inactive
@aadamgough aadamgough changed the title improvement(forwarding): added forwarding for outlook improvement(forwarding+excel): added forwarding and improve excel read Aug 26, 2025

const logger = createLogger('Tools')

// Extract a concise, meaningful error message from diverse API error shapes
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah nvm this is the same thing as existing code I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yees

logger.error(`[${requestId}] Internal API error for ${toolId}:`, {
status: errorInfo?.status,
errorData: errorInfo?.data,
status: (errorToTransform as any).status,
Copy link
Collaborator

Choose a reason for hiding this comment

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

we shouldn't move towards any typing....why are we making these changes?

@vercel vercel bot temporarily deployed to Preview – docs August 27, 2025 03:11 Inactive
@vercel vercel bot temporarily deployed to Preview – docs August 27, 2025 03:13 Inactive
rawEmail?: OutlookEmail // Only included when includeRawEmail is true
}

/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we use a library func for this....doing this ourselves is almost certainly going to break something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah changing rn

@icecrasher321 icecrasher321 merged commit ab74b13 into staging Aug 27, 2025
5 checks passed
waleedlatif1 pushed a commit that referenced this pull request Aug 27, 2025
#1136)

* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
waleedlatif1 added a commit that referenced this pull request Aug 27, 2025
…is for queueing docs in kb (#1143)

* improvement(kb): created knowledge, chunks, tags services and use redis for queueing docs in kb

* moved directories around

* cleanup

* bulk create docuemnt records after upload is completed

* fix(copilot): send api key to sim agent (#1142)

* Fix api key auth

* Lint

* ack PR comments

* added sort by functionality for headers in kb table

* updated

* test fallback from redis, fix styling

* cleanup copilot, fixed tooltips

* feat: local auto layout (#1144)

* feat: added llms.txt and robots.txt (#1145)

* fix(condition-block): edges not following blocks, duplicate issues (#1146)

* fix(condition-block): edges not following blocks, duplicate issues

* add subblock update to setActiveWorkflow

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/condition-input.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix dependency array

* fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files (#1147)

* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation

* improvement(forwarding+excel): added forwarding and improve excel read (#1136)

* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>

* revert agent const

* update docs

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
@waleedlatif1 waleedlatif1 deleted the improvement/outlook branch August 27, 2025 06:12
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
simstudioai#1136)

* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…is for queueing docs in kb (simstudioai#1143)

* improvement(kb): created knowledge, chunks, tags services and use redis for queueing docs in kb

* moved directories around

* cleanup

* bulk create docuemnt records after upload is completed

* fix(copilot): send api key to sim agent (simstudioai#1142)

* Fix api key auth

* Lint

* ack PR comments

* added sort by functionality for headers in kb table

* updated

* test fallback from redis, fix styling

* cleanup copilot, fixed tooltips

* feat: local auto layout (simstudioai#1144)

* feat: added llms.txt and robots.txt (simstudioai#1145)

* fix(condition-block): edges not following blocks, duplicate issues (simstudioai#1146)

* fix(condition-block): edges not following blocks, duplicate issues

* add subblock update to setActiveWorkflow

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/condition-input.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix dependency array

* fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files (simstudioai#1147)

* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation

* improvement(forwarding+excel): added forwarding and improve excel read (simstudioai#1136)

* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>

* revert agent const

* update docs

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
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