-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Adding instructions for Google Chat BYOA. #14863
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,123 @@ The Google Chat API allows you to build custom bots for Google Chat, enabling au | |
| - **Meeting Scheduler**: Set up a workflow that triggers when someone requests a meeting in a Google Chat room. The bot can interact with Google Calendar to find available slots and propose meeting times directly within the chat. | ||
|
|
||
| - **CI/CD Notifications**: Integrate with GitHub to send updates on code commits, pull requests, or build statuses from your CI/CD pipeline into a Google Chat room, keeping your development team informed in real-time. | ||
|
|
||
|
|
||
| # Getting Started | ||
|
|
||
| ## Creating a Google Chat app | ||
| In order to connect your workspace Google Chat account to Pipedream, you'll need do the following: | ||
| 1. Create a Google Chat app in Google Cloud (a Google workspace account is required.) | ||
| 2. Connect this app using custom OAuth clients on Pipedream. See the directions [here](https://pipedream.com/docs/connected-accounts/oauth-clients) on how to configure a custom OAuth client on Pipedream. | ||
|
|
||
| 1. Sign in to the [Google Cloud Console](https://cloud.google.com/) | ||
| 2. Select an existing project or create a new one | ||
|
|
||
|  | ||
|
|
||
| 3. Select **APIs & Services** | ||
| 4. Click **Enable APIs & Services** | ||
|
|
||
|  | ||
|
|
||
| 5. Search for and select **Chat API** | ||
| 6. Click **Enable** | ||
|
|
||
|  | ||
|
|
||
| 7. Click **OAuth consent screen** on the left side | ||
|
|
||
|  | ||
|
|
||
| 8. If you only intend to use this application within your organization, select **Internal** (recommended) and click "Create." In this mode, your app is limited to Google Workspace users within your organization. If you select **External**, you will need to go through the process of app verification in order use any sensitive or restricted scopes. | ||
|
|
||
|  | ||
|
|
||
| 9. Fill in the required fields and click **Save and Continue** | ||
| 10. Under **Authorized Domains**, add `pipedream.com` | ||
| 11. Click **Add or remove scopes** and Filter by `Chat API` select whichever scopes you intend to use and then click "Update". For more information about available Google Chat scopes, please see this [overview](https://developers.google.com/chat/api/guides/auth#chat-api-scopes). | ||
| 12. Click **Save and Continue** to finish the **Scopes** step | ||
| 13. You should be prompted with a **Summary** page. | ||
|
|
||
| ## Create OAuth Credentials in Google Cloud | ||
|
|
||
| You will need to generate a set of OAuth credentials to connect your new Google Chat app to Pipedream. | ||
|
|
||
| 1. Navigate to the **Credentials** section on the left side. | ||
|
|
||
|  | ||
|
|
||
| 2. Click **Create Credentials** at the top and select **“*OAuth client ID** | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| 3. Select **Web application** for **Application type** | ||
|
|
||
|  | ||
|
|
||
| 4. Give your app a name. | ||
|
|
||
| ## Create a Custom OAuth Client in Pipedream | ||
|
|
||
| 5. Navigate to the workspace where you want to connect your Google Chat app, and go to **Accounts**, then **OAuth Clients**, and click **New OAuth Client. | ||
|
|
||
| 6. Search for the "Google Chat" app and name your custom OAuth client. You will get a unique **Redirect URI** which you will need to configure in Google. | ||
|
|
||
| 7. In the Google Cloud app configuration, under **Authorized redirect URIs**, click **Add URI** and enter the Redirect URI of your custom Google Chat client. | ||
|
|
||
|  | ||
|
|
||
| 8. Click **Create** to create your new OAuth keys | ||
| 9. Note the client ID and client Secret, but keep these private and secure | ||
|
|
||
|  | ||
|
|
||
| 10. Add your Client ID and Client Secret to your custom OAuth Google Chat client on Pipedream. | ||
|
|
||
| ## Configure your Google Chat application | ||
|
|
||
| 1. Click **Enable APIs & Services** on the top-left navigation bar, then **Google Chat API**. | ||
|
|
||
| 2. Click **Configuration** | ||
|
|
||
| 3. Fill in the required details - please note that the values you provide here will be the name of the app that you add to your Google Chat workspace. | ||
|
|
||
| 4. You can name the application whatever you'd like for the app to be called within the Google Chat workspace, e.g. **Pipedream** | ||
|
|
||
| 5. If you'd like to use the Pipedream logo for the avatar, use the URL [https://pipedream.com/s.v0/app_13GhYE/logo/orig](https://pipedream.com/s.v0/app_13GhYE/logo/orig) for the **Avatar URL** | ||
|
|
||
| 6. Add a **Description**. | ||
|
|
||
| 7. Select any **Interactive features** you require for your app. | ||
|
|
||
| 8. Add an **App URL**, ideally, an HTTPS URL that you control, or you can provide the following app url [https://pipedream.com/apps/google-chat-developer-app](https://pipedream.com/apps/google-chat-developer-app). | ||
|
|
||
| 9. Under **Visibility**, add the email addresses of the individuals or groups within your Google Workspace organization. | ||
|
|
||
| 10. Click **Save**. | ||
|
|
||
|  | ||
|
|
||
| ## Connect your Google Chat app Pipedream with your Google Chat app OAuth credentials | ||
|
|
||
| At this point, you should have a Google Chat App under your Google Project, and a custom OAuth client on Pipedream. Make sure that the scopes in your custom OAuth client match the scopes you enabled in Google Cloud. | ||
|
|
||
| You should now be able to use your Google Chat application that you created on Pipedream! | ||
|
|
||
| ## Publish your Google Chat app (EXTERNAL ONLY) | ||
| Google has a [7 day expiration window](https://developers.google.com/identity/protocols/oauth2#:~:text=A%20Google%20Cloud,Connect%20equivalents) on refresh tokens for applications that are set to **External** users with a publishing status of "Testing", so you will need to **Publish** your application in order to maintain your account connection. | ||
|
|
||
| 1. Navigate to your application, and click **OAuth Consent Screen** on the lefthand sidebar. | ||
| 2. Under **Publishing status**, click **Publish App**. If you included any sensitive or restricted scopes in your app, there will be a disclosure stating that you will need to go through the process of verification. Click **Confirm**. | ||
| 3. Your application will not be available externally unless you share your **client_id** with others, and you will not have to go through the verification process unless you intend to onboard over 100 users. | ||
| 4. The publishing status should be set to **In production**, and your account should maintain its connection without an expiration window. | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| # Troubleshooting | ||
| **Application disconnects after 7 days**<br> | ||
| If your developer application disconnects after 7 days, you need to follow the steps above to Publish your Google Chat app in order to keep your account connected. | ||
|
Comment on lines
+129
to
+131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Expand troubleshooting section Consider adding these common scenarios:
🧰 Tools🪛 LanguageTool[style] ~131-~131: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM) |
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance visibility of critical publishing information
Consider restructuring this section to:
Example warning format:
> ⚠️ **Important**: External apps in testing mode will disconnect after 7 days. Ensure you publish your app to prevent disconnection.🧰 Tools
🪛 LanguageTool
[style] ~118-~118: Consider a shorter alternative to avoid wordiness.
Context: ...ll need to Publish your application in order to maintain your account connection. 1. N...
(IN_ORDER_TO_PREMIUM)