Skip to content

[Feat] Notion Authorization with Rocket.Chat #4

@Nabhag8848

Description

@Nabhag8848

What do we need?

  • When a user runs /notion connect will send the following message in the current room with greetings having the name of the user. When the user clicks Connect to workspace they will be redirected to the Notion website where they will be prompted to authorize Rocket.Chat to access their Notion account. if Authorized, redirected payload back to Rocket.Chat.
  • When a user /notion disconnect command they will get disconnected from the current connected workspace (if any).

Acceptance Criteria

  • Create Setting for Credentials (SettingType STRING - ClientId, SettingType PASSWORD Client Secret).
  • Register Command with params connect and disconnect.
  • Create MessageBuilder with Button (only in case of connect)
  • Send Relevant Notification to Channel including Message from MessageBuilder when there is complete execution.
  • Create Function to getTokenInfo else Send Relevant Notification with Connect to Workspace button alerting user not connected.
  • Create WebHookEndpoint for handling Notion Callback
  • Create NotionSDK Class

Relevant ScreenShots

notion connect
notion disconnect

Further Comments

  • Create CustomError Class extending which have CommonError class
  • Use URL Package when needed
  • Use Integration SVG in Authorization HTML page.

Edge Cases

  • When User Changes State in AuthURL
  • When User Leaves in Between Auth
  • When User Cancel the Auth but Go Back to AuthURL pressing <— in Browser
  • When User runs connect command in two channels [Say first and Second] one by one during session and connects from First Message should go to First and so on.
  • When There is Problem from Notion Provider to Generate Token
  • Using feat with multiple user.
  • Handle Empty Credentials and give Notification to channel as per user Roles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions