langflow icon indicating copy to clipboard operation
langflow copied to clipboard

feat: Add Composio Outlook component

Open abhishekpatil4 opened this issue 6 months ago • 3 comments

This pull request introduces a new Outlook component to the langflow project, including backend support, unit tests, and frontend icon integration. The most important changes are:

Backend support:

  • src/backend/base/langflow/components/composio/__init__.py: Added import and registration for ComposioOutlookAPIComponent .

Frontent support:

  • src/frontend/src/icons: Added a new SVG icon component for Outlook, created a forwardRef wrapper & updated sidebar bundles to include the new Outlook component with its icon.

Unit tests:

  • src/backend/tests/unit/components/bundles/composio/test_outlook.py: Added comprehensive unit tests for ComposioOutlookAPIComponent , including tests for initialization, action execution, data conversion, and configuration updates.

abhishekpatil4 avatar May 12 '25 05:05 abhishekpatil4

@abhishekpatil4 can you fix the conflicts?

edwinjosechittilappilly avatar May 12 '25 05:05 edwinjosechittilappilly

@abhishekpatil4 can you fix the conflicts?

will do

abhishekpatil4 avatar May 12 '25 21:05 abhishekpatil4

Hi! I'm autofix logoautofix.ci, a bot that automatically fixes trivial issues such as code formatting in pull requests.

I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:

  1. Allow edits by maintainers for your pull request, and then re-trigger CI (for example by pushing a new commit).
  2. Manually fix the issues identified for your pull request (see the GitHub Actions output for details on what I would like to change).

autofix-ci[bot] avatar May 13 '25 13:05 autofix-ci[bot]

Walkthrough

The changes introduce a new Outlook integration across backend and frontend. A backend component enables Outlook API actions via Composio, with comprehensive unit tests. The frontend adds a new Outlook icon, integrates it into the sidebar, and updates icon mappings for display. All modifications are additive and modular.

Changes

File(s) Change Summary
src/backend/base/langflow/components/composio/__init__.py Added import and public export for ComposioOutlookAPIComponent.
src/backend/base/langflow/components/composio/outlook_composio.py Introduced ComposioOutlookAPIComponent with multiple Outlook API actions, input definitions, dynamic execution, and error handling.
src/backend/tests/unit/components/bundles/composio/test_outlook.py Added unit tests for ComposioOutlookAPIComponent, covering initialization, action execution, error handling, DataFrame output, and build config updates.
src/frontend/src/icons/lazyIconImports.ts Added lazy-loaded Outlook icon entry to lazyIconsMapping.
src/frontend/src/icons/outlook/index.tsx and src/frontend/src/icons/outlook/outlook.jsx Added new Outlook icon React component with SVG implementation.
src/frontend/src/utils/styleUtils.ts Added "Outlook" to SIDEBAR_BUNDLES and updated nodeIconToDisplayIconMap with "Outlook" mapping.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Frontend
    participant Backend
    participant ComposioOutlookAPIComponent
    participant ComposioToolset
    participant Outlook API

    User->>Frontend: Selects Outlook action (e.g., send email)
    Frontend->>Backend: Sends request with action and parameters
    Backend->>ComposioOutlookAPIComponent: Calls execute_action()
    ComposioOutlookAPIComponent->>ComposioToolset: Executes mapped Outlook action
    ComposioToolset->>Outlook API: Sends API request
    Outlook API-->>ComposioToolset: Returns response
    ComposioToolset-->>ComposioOutlookAPIComponent: Returns result
    ComposioOutlookAPIComponent-->>Backend: Processes and returns output
    Backend-->>Frontend: Returns action result
    Frontend-->>User: Displays result

📜 Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 51479a292a9f944be7924e6a98d0a6b447295084 and 2f911871df3fef55a30c32e2d0a8b052c9652554.

📒 Files selected for processing (1)
  • src/frontend/src/icons/outlook/outlook.jsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Optimize new Python code in this PR
  • GitHub Check: Ruff Style Check (3.13)
  • GitHub Check: Update Starter Projects
  • GitHub Check: Run Ruff Check and Format
🔇 Additional comments (1)
src/frontend/src/icons/outlook/outlook.jsx (1)

1-24: LGTM! Implementation follows maintainer suggestions.

This implementation correctly addresses the feedback from previous reviews and follows the exact structure suggested by @ogabrielluiz. The component properly spreads props onto the SVG element, uses correct JSX syntax, and maintains the appropriate icon styling for the Outlook component integration.

✨ Finishing Touches
  • [ ] 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Jun 02 '25 03:06 coderabbitai[bot]

add result_field so that the result is better formatted.

Follow the pattern in Gmail component

Hey @edwinjosechittilappilly, I've added the result_field. Please review the changes

abhishekpatil4 avatar Jun 02 '25 03:06 abhishekpatil4