Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Nov 20, 2025

Resolves #19132

Summary by CodeRabbit

  • Bug Fixes

    • Added validation to prevent using $search together with $filter or $orderby in relevant email search actions, avoiding invalid queries.
  • Documentation

    • Clarified property descriptions to state that search cannot be used with filter or ordering options.
  • Chores

    • Incremented version numbers across Microsoft Outlook actions, sources, and package for the release.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Nov 20, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Nov 20, 2025 8:32pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 20, 2025 8:32pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 20, 2025

Pre-merge checks and finishing touches

❌ Failed checks (2 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description only contains 'Resolves #19132' with no substantive explanation of changes made or why. Expand the description to explain what changes were made and why these changes resolve the bug.
Out of Scope Changes check ❓ Inconclusive Most changes are in-scope to find-email actions, but version bumps across 15+ unrelated actions may indicate incomplete scope. Clarify whether version bumps were intentional or should be reverted to isolate only find-email-related changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Microsoft Outlook - update find-email' accurately reflects the primary change, focusing on find-email action updates.
Linked Issues check ✅ Passed The code changes fully address linked issue #19132: validation logic and descriptions updated across find-email variants.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-19132

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df24d08 and f063058.

📒 Files selected for processing (2)
  • components/microsoft_outlook/actions/find-email/find-email.mjs (3 hunks)
  • components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-15T22:01:17.593Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/README.md:45-49
Timestamp: 2025-09-15T22:01:17.593Z
Learning: In Leonardo AI components (and likely other Pipedream components), prefer using info alert props on the component itself rather than detailed "Key Features" sections in README files for action documentation.

Applied to files:

  • components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs
  • components/microsoft_outlook/actions/find-email/find-email.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (8)
components/microsoft_outlook/actions/find-email/find-email.mjs (5)

2-2: LGTM!

The import is necessary for the runtime validation and follows the correct Pipedream platform pattern.


8-8: LGTM!

The version bump is appropriate for the bug fix and constraint addition.


17-21: LGTM!

The info alert has been properly updated to document the $search constraint, addressing the past review comment. The wording is clear and includes a helpful link to the Microsoft documentation.


55-57: LGTM!

The runtime validation correctly prevents invalid query combinations and provides a clear error message. The logic is sound and the validation occurs before any API calls, failing fast when constraints are violated.


61-87: LGTM!

The logic correctly splits search and non-search paths:

  • Search path (lines 78-84) uses only $search and $top, properly excluding $filter and $orderby
  • Non-search path (lines 62-72) uses $filter and $orderby with pagination
  • Both paths respect maxResults appropriately

The implementation correctly enforces the API constraints identified in issue #19132.

components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs (3)

2-8: Import of ConfigurationError and version bump are appropriate.

The new ConfigurationError import is used in the validation block and the version bump to 0.0.5 reflects the behavioral and UX change to the action. No issues here.


35-35: Info alert correctly documents $search incompatibility.

The info alert now clearly states that $search cannot be used with $filter or $orderby, while preserving the existing explanation and docs link for $filter + $orderby. This matches the constraints described in issue #19132.


63-65: Runtime guard for $search + $filter / $orderby is correct and useful.

The guard cleanly prevents configurations that combine $search with $filter or $orderby, surfacing a clear ConfigurationError instead of a less friendly Graph API error. This should improve reliability and debuggability for callers.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@michelle0927 michelle0927 marked this pull request as ready for review November 20, 2025 18:44
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs (1)

67-80: Consider branching logic to match find-email.mjs implementation.

Unlike find-email.mjs (lines 61-87), this implementation doesn't branch based on whether search is provided. Instead, it passes all three parameters ($search, $filter, $orderby) to the paginate function regardless. While undefined values may be filtered by the underlying method, explicit branching would:

  1. Make the implementation consistent with find-email.mjs
  2. Clarify the mutually-exclusive nature of these query modes
  3. Avoid potential issues if the underlying method behavior changes

Consider refactoring to match the pattern in find-email.mjs:

   async run({ $ }) {
     if (this.search && (this.filter || this.orderBy)) {
       throw new ConfigurationError("`$search` not supported when using `$filter` or `$orderby`.");
     }
 
+    let params;
+    if (this.search) {
+      params = {
+        "$search": this.search,
+      };
+    } else {
+      params = {
+        "$filter": this.filter,
+        "$orderby": this.orderBy,
+      };
+    }
+
     const items = this.microsoftOutlook.paginate({
       fn: this.microsoftOutlook.listSharedFolderMessages,
       args: {
         $,
         userId: this.userId,
         sharedFolderId: this.sharedFolderId,
-        params: {
-          "$search": this.search,
-          "$filter": this.filter,
-          "$orderby": this.orderBy,
-        },
+        params,
       },
       max: this.maxResults,
     });
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f9a2f5 and df24d08.

📒 Files selected for processing (22)
  • components/microsoft_outlook/actions/add-label-to-email/add-label-to-email.mjs (1 hunks)
  • components/microsoft_outlook/actions/approve-workflow/approve-workflow.mjs (1 hunks)
  • components/microsoft_outlook/actions/create-contact/create-contact.mjs (1 hunks)
  • components/microsoft_outlook/actions/create-draft-email/create-draft-email.mjs (1 hunks)
  • components/microsoft_outlook/actions/download-attachment/download-attachment.mjs (1 hunks)
  • components/microsoft_outlook/actions/find-contacts/find-contacts.mjs (1 hunks)
  • components/microsoft_outlook/actions/find-email/find-email.mjs (2 hunks)
  • components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs (2 hunks)
  • components/microsoft_outlook/actions/list-contacts/list-contacts.mjs (1 hunks)
  • components/microsoft_outlook/actions/list-folders/list-folders.mjs (1 hunks)
  • components/microsoft_outlook/actions/list-labels/list-labels.mjs (1 hunks)
  • components/microsoft_outlook/actions/move-email-to-folder/move-email-to-folder.mjs (1 hunks)
  • components/microsoft_outlook/actions/remove-label-from-email/remove-label-from-email.mjs (1 hunks)
  • components/microsoft_outlook/actions/reply-to-email/reply-to-email.mjs (1 hunks)
  • components/microsoft_outlook/actions/send-email/send-email.mjs (1 hunks)
  • components/microsoft_outlook/actions/update-contact/update-contact.mjs (1 hunks)
  • components/microsoft_outlook/microsoft_outlook.app.mjs (1 hunks)
  • components/microsoft_outlook/package.json (1 hunks)
  • components/microsoft_outlook/sources/new-attachment-received/new-attachment-received.mjs (1 hunks)
  • components/microsoft_outlook/sources/new-contact/new-contact.mjs (1 hunks)
  • components/microsoft_outlook/sources/new-email-in-shared-folder/new-email-in-shared-folder.mjs (1 hunks)
  • components/microsoft_outlook/sources/new-email/new-email.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (25)
components/microsoft_outlook/microsoft_outlook.app.mjs (3)

238-243: Clear constraint documentation for $search parameter.

The description now explicitly states incompatibilities with both $filter and $orderby, which directly addresses the issue and will help LLMs avoid constructing invalid queries. The formatting and wording are clear.


244-249: Consistent bidirectional constraint documentation for $filter.

The description now states the incompatibility with $search, maintaining consistency with the search parameter's documentation. This ensures users understand the restriction from both directions.


250-255: Consistent bidirectional constraint documentation for $orderBy.

The description now states the incompatibility with $search, maintaining consistency across all three interdependent parameters. The constraint documentation is complete and properly formatted.

components/microsoft_outlook/sources/new-email-in-shared-folder/new-email-in-shared-folder.mjs (1)

10-10: LGTM: Version bump is appropriate.

The version increment aligns with the broader release update across Microsoft Outlook integration components.

components/microsoft_outlook/sources/new-attachment-received/new-attachment-received.mjs (1)

9-9: LGTM: Version bump is appropriate.

The version increment is consistent with the release update pattern across the PR.

components/microsoft_outlook/sources/new-email/new-email.mjs (1)

10-10: LGTM: Version bump is appropriate.

The version increment is consistent with the broader release update.

components/microsoft_outlook/actions/send-email/send-email.mjs (1)

7-7: LGTM: Version bump is appropriate.

The version increment aligns with the release update pattern.

components/microsoft_outlook/actions/reply-to-email/reply-to-email.mjs (1)

7-7: LGTM: Version bump is appropriate.

The version increment is consistent with the broader release update.

components/microsoft_outlook/actions/remove-label-from-email/remove-label-from-email.mjs (1)

7-7: LGTM: Version bump is appropriate.

The version increment aligns with the release update pattern.

components/microsoft_outlook/actions/download-attachment/download-attachment.mjs (1)

9-9: LGTM: Version bump is appropriate.

The version increment is consistent with the broader release update.

components/microsoft_outlook/actions/list-labels/list-labels.mjs (1)

7-7: LGTM: Version bump is appropriate.

The version increment aligns with the release update pattern.

components/microsoft_outlook/package.json (1)

3-3: LGTM: Package version bump is appropriate.

The version increment from 1.7.6 to 1.7.7 is consistent with a patch release.

components/microsoft_outlook/actions/move-email-to-folder/move-email-to-folder.mjs (1)

7-7: LGTM: Version bump aligns with package release.

The version increment is appropriate for a package-wide release with no functional changes to this action.

components/microsoft_outlook/actions/create-draft-email/create-draft-email.mjs (1)

7-7: LGTM: Version bump aligns with package release.

The version increment is appropriate for a package-wide release with no functional changes to this action.

components/microsoft_outlook/actions/list-folders/list-folders.mjs (1)

7-7: LGTM: Version bump aligns with package release.

The version increment is appropriate for a package-wide release with no functional changes to this action.

components/microsoft_outlook/actions/list-contacts/list-contacts.mjs (1)

6-6: LGTM: Version bump aligns with package release.

The version increment is appropriate for a package-wide release with no functional changes to this action.

components/microsoft_outlook/sources/new-contact/new-contact.mjs (1)

8-8: LGTM: Version bump aligns with package release.

The version increment is appropriate for a package-wide release with no functional changes to this source.

components/microsoft_outlook/actions/update-contact/update-contact.mjs (1)

6-6: LGTM: Version bump aligns with package release.

The version increment is appropriate for a package-wide release with no functional changes to this action.

components/microsoft_outlook/actions/find-contacts/find-contacts.mjs (1)

6-6: LGTM: Version bump aligns with package release.

The version increment is appropriate for a package-wide release with no functional changes to this action.

components/microsoft_outlook/actions/create-contact/create-contact.mjs (1)

6-6: LGTM: Standard version bump.

The version increment aligns with other actions in this PR and contains no functional changes.

components/microsoft_outlook/actions/add-label-to-email/add-label-to-email.mjs (1)

8-8: LGTM: Standard version bump.

The version increment aligns with other actions in this PR and contains no functional changes.

components/microsoft_outlook/actions/approve-workflow/approve-workflow.mjs (1)

7-7: LGTM: Standard version bump.

The version increment aligns with other actions in this PR and contains no functional changes.

components/microsoft_outlook/actions/find-email/find-email.mjs (2)

55-57: LGTM: Validation correctly prevents invalid query combinations.

The runtime check properly enforces the Microsoft Graph API constraint that $search cannot be combined with $filter or $orderby.


61-87: LGTM: Branching logic correctly separates search from filter/orderBy paths.

The implementation properly routes requests to avoid sending conflicting query parameters to the API.

components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs (1)

63-65: LGTM: Validation correctly prevents invalid query combinations.

The runtime check properly enforces the Microsoft Graph API constraint that $search cannot be combined with $filter or $orderby.

Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

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

Hi @michelle0927, LGTM! Ready for QA!

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.

[BUG] The query parameter '$orderBy' is not supported with '$search' in outlook MCP Find email tool

3 participants