# Google Cloud Function (Python script) to connect custom apps

**URL:** <https://community.hubspot.com/t/google-cloud-function-python-script-to-connect-custom-apps/43732>\
**Category:** APIs & Integrations\
**Tags:** python, oauth\
**Created:** [September 13, 2021, 3:06pm UTC](https://community.hubspot.com/t/google-cloud-function-python-script-to-connect-custom-apps/43732 "2021-09-13T15:06:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TLeong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tleong/32/68653_2.png) [@TLeong](https://community.hubspot.com/u/TLeong)\
**Post date:** [September 13, 2021, 3:06pm UTC](https://community.hubspot.com/t/google-cloud-function-python-script-to-connect-custom-apps/43732/1 "2021-09-13T15:06:41Z")

</div>

Hi Team,

I’m new to Hubspot custom apps integration. I have created the custom apps in the Developer account and successfully installed in the test account.

Here is the problem, I would like to use Python script in Google Cloud Function, to integrate with my custom apps in Hubspot.

I would like to create an action button for this custom CRM card, with the Python script in GCF.

Is there any use case/reference? or any expert work on this before?

Appreciate it.

Thanks

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [September 14, 2021, 1:50pm UTC](https://community.hubspot.com/t/google-cloud-function-python-script-to-connect-custom-apps/43732/2 "2021-09-14T13:50:10Z")

</div>

@wfong , @BJacobson , @JBeatty

Can any of you help @TLeong out here?

@TLeong , welcome to the world of HubSpot 😀

---

<div class="post-metadata">

**Author:** ![TLeong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tleong/32/68653_2.png) [@TLeong](https://community.hubspot.com/u/TLeong)\
**Post date:** [September 14, 2021, 2:50pm UTC](https://community.hubspot.com/t/google-cloud-function-python-script-to-connect-custom-apps/43732/3 "2021-09-14T14:50:11Z")

</div>

Thanks @dennisedson 😀

I try to use Postman mock url with Example data and managed to display the action button & data.

However, still struggle on the Python part, to display CRM card information using Python, as I would like to deploy it on Google Cloud Function.

This is the desired output:

 ![Screenshot 2021-09-14 at 10.34.37 PM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/9/c964a3d7d42ae6cc02773132eea9affceb14786e.jpeg)

_(this is the test result I have created from Postman by using mock url)_

Thanks

---

<div class="post-metadata">

**Author:** ![JBeatty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jbeatty/32/52252_2.png) [@JBeatty](https://community.hubspot.com/u/JBeatty)\
**Post date:** [September 14, 2021, 2:48pm UTC](https://community.hubspot.com/t/google-cloud-function-python-script-to-connect-custom-apps/43732/4 "2021-09-14T14:48:16Z")

</div>

Hi @TLeong,

First you’ll need to set up your Google Cloud Functions and ensure it can be accessed through HTTP. Having worked primarily with AWS, I am not an expert in that in anyway with Google Cloud so I will just point you to some tutorials on setting a python Cloud Function with HTTP. [Here](https://cloud.google.com/functions/docs/writing/http#writing_http_helloworld-python) and [here](https://codelabs.developers.google.com/codelabs/cloud-functions-python-http). Though the process should be similar to AWS Serverless Functions.

Next you’ll need to create the CRM card, to do that I recomend reading through these pages: [This Blogpost](https://developers.hubspot.com/blog/hubspot-crm-cards-api), [The Legacy Docs](https://legacydocs.hubspot.com/docs/methods/crm-extensions/crm-extensions-overview), and [The Current Docs](https://developers.hubspot.com/docs/api/crm/extensions/custom-cards). Between these three pages is all the information you need to be able to generate the JSON schema you want to send through the API listed on the current docs to create the card. Notice in The Legacy Docs the “Action” section of the JSON schema which is where you will put the URL to your Gooogle Cloud Function.

---

<div class="post-metadata">

**Author:** ![TLeong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tleong/32/68653_2.png) [@TLeong](https://community.hubspot.com/u/TLeong)\
**Post date:** [September 15, 2021, 1:35pm UTC](https://community.hubspot.com/t/google-cloud-function-python-script-to-connect-custom-apps/43732/5 "2021-09-15T13:35:41Z")

</div>

Hi @JBeatty

Thank you for your reply.

I managed to customize the CRM card with button.

I have created the python file in GCF and include the json file.

The CRM card then managed to grab the data from the json file and display in the card.

Thanks
