google chat integration

Abdulrahman alabdullah
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 8, 2023

Hi 

I have a problem with sending the status of the pipeline and branch that trigger the pipeline to Google Chat using the curl command and using webhook from Google Chat 

the message received in Google chat like this 
"Pipeline has finished for branch: ${BITBUCKET_BRANCH} with status: ${BITBUCKET_BUILD_STATUS} " 

 

and the pipeline is like this 

        after-script:
          - >
            curl -X POST -H "Content-Type: application/json" -d '{
              "text": "Pipeline has finished for branch: ${BITBUCKET_BRANCH} with status: ${BITBUCKET_BUILD_STATUS}"
            }' ${GOOGLE_CHAT_WEBHOOK_URL}



another issue I am trying to use the bitbucket for Google chat 
after connecting and trying to select the repository I get this error 
          Could not load dialog. Invalid response returned by app

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 11, 2023

Hi Abdulrahman and welcome to the community!

You mention in your post that you are facing two issues.

 

For the first issue with the curl command in the pipeline, could you please let us know:

  • What is the output of the curl command when you run it in Pipelines?

  • Are you able to run this command successfully locally, from your computer, if you replace the variable names (BITBUCKET_BRANCH, BITBUCKET_BUILD_STATUS, GOOGLE_CHAT_WEBHOOK_URL) with their respective values?

 

Regarding the second issue:

another issue I am trying to use the bitbucket for Google chat
after connecting and trying to select the repository I get this error
Could not load dialog. Invalid response returned by app

It is not clear which screen gives you this error.

Please keep in mind that if the error comes from a third-party app, you will need to reach out to the app's vendor for support. I am asking for the above details so I can better understand where the error is coming from and which app you are using, and advise you on the next steps.

Kind regards,
Theodora

Abdulrahman alabdullah
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 11, 2023

Dear Theodora,

Thank you for your warm welcome and for your assistance with the issues I've been encountering.

Regarding the first issue with the curl command in the pipeline, I'm pleased to inform you that I managed to resolve it. The solution involved modifying the parameters of the curl command. Here's the revised command that effectively relayed the required information to my Google Chat space:
curl -d "{\"text\": \"Build started for branch: $BITUCKET_BRANCH, repository: $BITBUCKT_REPO_SLUG\"}

This adjustment ensured the accurate display of the branch and repository details in Google Chat.

Moving on to the second issue concerning the Bitbucket integration with Google Chat, I confirm that I am using the following app from the Atlassian Marketplace: Google Chat App for Bitbucket.

The error occurs when I attempt to add a repository using this app. Specifically, after installing the app and navigating to the 'Add Repository' option, an error message stating "Could not load dialog. Invalid response returned by app" appears. Below is a screenshot depicting the exact moment the error is encountered:

 

I hope this information helps in diagnosing the issue further. I understand that if the problem stems from the third-party app, I may need to contact the app's vendor for support. However, any guidance or suggestions you could offer based on this situation would be greatly appreciated.

Thank you once again for your support and guidance.

Kind regards,

Abdulrahman



 

 

 

 

 

 

Screenshot from 2023-12-11 15-12-49.pngScreenshot from 2023-12-11 15-19-11.pngScreenshot from 2023-12-11 15-25-23.png

 

 

 

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 12, 2023

Hi Abdulrahman,

Thank you for the update and info, it's good to hear that you resolved the issue with the curl command!

I tried installing the app you linked on my workspace, but I don't see any option to add a repository there. Additionally, the screenshot you posted doesn't seem to be from Bitbucket Cloud. Is this screenshot from the Apps in your Google workspace or Google Chat?

I see in the app's description that an installation of this app https://workspace.google.com/marketplace/app/bitbucket_for_google_chat/313395291201 is also needed in Google Chat. If this is the app that is showing you this error, please check the Support resources on the app's page to request assistance. This second app is not developed by Atlassian and it is not even installed on Bitbucket side, so we don't have any knowledge of how it works and what are the possible reasons for this error.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events