Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Slack Integration #2125

Merged
merged 57 commits into from
Apr 9, 2024

Conversation

Palanikannan1437
Copy link
Contributor

@Palanikannan1437 Palanikannan1437 commented Feb 26, 2024

What does this PR do?

This PR adds in Slack integration to pipe in survery responses into your desired Slack Channels.

Demo

Screen.Recording.2024-01-22.at.5.37.53.PM.mov

How should this be tested?

  • Create a slack app via https://api.slack.com/apps
  • Keep token rotation in OAuth & Permission disabled or disable it
  • In OAuth & Permissions, add https://localhost:3000/api/auth/callback/slack as your redirect URL
  • Get the client_id and client_secret from the Basic Information tab and configure the SLACK_CLIENT_ID and SLACK_CLIENT_SECRET in your .env file
  • Head over to the Formbricks main web app and go to the integrations page
  • Click on the "Connect" button and complete the OAuth flow for slack after which you should be able to map channels to your surveys after a successful auth flow.

Appreciated

  • Updated the Formbricks Docs if changes were necessary --> TODO

Palanikannan1437 and others added 27 commits October 6, 2023 16:37
…nd-ui

feat: Initialised OAuth integration with Slack for Slack-App
Copy link

vercel bot commented Feb 26, 2024

@Palanikannan1437 is attempting to deploy a commit to the formbricks Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Feb 26, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Feb 26, 2024

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Member

@mattinannt mattinannt left a comment

Choose a reason for hiding this comment

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

@gupta-piyush19 Thanks for making this PR ready 😊💪 I still found a few things in the code that needs a change and a few smaller issues with the functionality:

apps/web/app/api/slack/route.ts Outdated Show resolved Hide resolved
apps/web/app/api/slack/callback/route.ts Outdated Show resolved Hide resolved
apps/web/app/api/slack/route.ts Outdated Show resolved Hide resolved
packages/types/integration/slack.ts Outdated Show resolved Hide resolved
@gupta-piyush19
Copy link
Contributor

Thanks for the review, @mattinannt 🚀
I see a lot of minor changes related to the code consistency. I overlook most of the changes in the first review as they are similar to the other integrations, which raises the need to refactor the other integrations as well. Let's pick it up in some other ticket; I've fixed it for Slack now.

@mattinannt
Copy link
Member

@gupta-piyush19 for the kamal setup we also now need the environment variables in these files:

  • .github/workflows/kamal-setup.yml
  • .github/workflows/kamal-deploy.yml
  • kamal/deploy.yml
    Can you please add the Slack environment variables here? :-)

@gupta-piyush19
Copy link
Contributor

Thanks, @mattinannt, for the review.
I've added the env for kamal setup. Can you please re-review the PR?

Copy link
Member

@mattinannt mattinannt left a comment

Choose a reason for hiding this comment

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

@Palanikannan1437 @gupta-piyush19 Thanks for your great job! Works great and is ready to be merged! 🚀💪

@gupta-piyush19
Copy link
Contributor

Thanks, @Palanikannan1437 for the PR and @mattinannt for the review(s). 🙌

@gupta-piyush19 gupta-piyush19 added this pull request to the merge queue Apr 9, 2024
Merged via the queue into formbricks:main with commit 7482918 Apr 9, 2024
9 of 11 checks passed
@briannezhad
Copy link

briannezhad commented Apr 29, 2024

This doesn't show up for us in self-hosted. We are using https:// and have set up the variables. version v1.6.1. I follow documentation on website: https://formbricks.com/docs/integrations/slack#setup-in-self-hosted-formbricks
Screenshot 2024-04-28 at 8 37 5\\6 PM

@gupta-piyush19
Copy link
Contributor

@briannezhad Slack integration is yet to be released for self-hosted users in the upcoming release (in a few days). It is currently available for cloud users. We updated the documentation, which caused the confusion. Apologise for the inconvenience. You'll be notified once it's released.

@briannezhad
Copy link

Thank you. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants