diff --git a/HubSpot/HubSpot_Create_company.ipynb b/HubSpot/HubSpot_Create_company.ipynb
new file mode 100644
index 0000000000..a6d4797293
--- /dev/null
+++ b/HubSpot/HubSpot_Create_company.ipynb
@@ -0,0 +1,277 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "b772e713-6a71-48e5-8b7c-a9280660420e",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "3fd8a8ca-257a-4cc3-9e03-253c5aecc714",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "# HubSpot - Create company"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "c64b5065-c0f4-4dc4-a121-74d2096b9820",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Tags:** #hubspot #company #create #crm #business #management"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "60064cb2-52d5-4e3e-903c-ecd67802f7ab",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Author:** [Florent Ravenel](https://www.linkedin.com/in/florent-ravenel)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "b49aabbb-fda5-4ec3-9803-35750bbc072c",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Last update:** 2023-09-25 (Created: 2023-09-25)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "cd8fa6b1-932e-4aaa-9b86-d23c88f7d3d8",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Description:** This notebook will show how to create a company in HubSpot and how it is useful for organizations."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4d15d2e0-2150-48d9-a3fa-191fa1281045",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**References:**\n",
+ "- [HubSpot CRM API - Companies](https://developers.hubspot.com/docs/api/crm/companies)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "841c9cb1-770e-401a-85c7-650629ad4bba",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Input"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "30622949-e9f6-4a56-939f-f4081b2c1df0",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Import libraries"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "497d7edf-1a3d-4f70-8bb0-0c841274820e",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "from naas_drivers import hubspot\n",
+ "import naas"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "524ce4db-0aee-43bf-bf72-d5125edd5a08",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Setup variables\n",
+ "**Mandatory**\n",
+ "\n",
+ "[Get your HubSpot Access token](https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key)\n",
+ "- `hs_access_token`: This variable stores an access token used for accessing the HubSpot API.\n",
+ "\n",
+ "**Optional**\n",
+ "- `properties`: This variable holds a dictionary that contains key-value pairs for creating a new company in HubSpot. You have the flexibility to include any custom properties, using their respective internal HubSpot names. To list company properties, you can use this template: \"HubSpot_List_company_properties.ipynb\" stored in https://github.com/jupyter-naas/awesome-notebooks."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "8735a84c-91eb-4c60-b427-53ad34fa3b02",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "hs_access_token = naas.secret.get(\"HS_ACCESS_TOKEN\") or \"YOUR_HS_ACCESS_TOKEN\"\n",
+ "properties = {\n",
+ " \"name\": \"HubSpot\", \n",
+ " \"domain\": \"hubspot.com\",\n",
+ " \"city\": \"Cambridge\",\n",
+ " \"phone\": \"555-555-555\",\n",
+ " \"state\": \"Massachusetts\",\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "2dad33a7-3026-4e4e-a297-cfd51a40e90d",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Model"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "29afce7c-7211-4179-b35d-7485f03506bf",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Create company"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ec344680-b35b-4e4d-8f9a-d7668f94c5fb",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "This method will allow you to add any compnay properties available in your HubSpot."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "73929d4f-42ee-43c4-a3b8-f51a3e2ca108",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "hs_properties = {\"properties\": properties}\n",
+ "obj = hubspot.connect(hs_access_token).companies.send(hs_properties)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "e7234f74-eaf9-41c9-af6e-9306d9e1566d",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Output"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "c9944cfe-45d0-4207-a8ea-dfc61f63d4bb",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Display result"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "6bc1eace-ab86-4bd5-8eee-7cbaadaf3d52",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "obj"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "7fb84e3c-64d2-4198-93b9-22e0805ba311",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ " "
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.6"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "state": {},
+ "version_major": 2,
+ "version_minor": 0
+ }
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/HubSpot/HubSpot_Delete_company.ipynb b/HubSpot/HubSpot_Delete_company.ipynb
new file mode 100644
index 0000000000..d2fb8864cf
--- /dev/null
+++ b/HubSpot/HubSpot_Delete_company.ipynb
@@ -0,0 +1,261 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "expressed-daisy",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "prospective-parker",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "# HubSpot - Delete a company\n",
+ "
Give Feedback | Bug report"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "accessory-burke",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Tags:** #hubspot #crm #sales #company #naas_drivers #snippet #delete"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6caf958a-6ed9-4ae5-8555-c17676566d8d",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Author:** [Florent Ravenel](https://www.linkedin.com/in/florent-ravenel/)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4ecd37b0-d515-4c84-b3ab-c1ab4c5149d4",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Last update:** 2023-09-25 (Created: 2023-09-25)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "naas-description",
+ "metadata": {
+ "papermill": {},
+ "tags": [
+ "description"
+ ]
+ },
+ "source": [
+ "**Description:** This notebook demonstrates how to delete a given company in HubSpot using its HubSpot ID."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "42dbddd2-fd20-45b4-a0e6-7fa6e78d367b",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**References:**\n",
+ "- [HubSpot CRM API - Companies](https://developers.hubspot.com/docs/api/crm/companies)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "625a155e-110f-41c9-9ecd-dd5d5e78556d",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Input"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ebea7cbc-254b-4d88-bed0-8051d4a58856",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Import libraries"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "f34eed5c-38ec-4589-91f6-1e091507d9b9",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "from naas_drivers import hubspot\n",
+ "import naas"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4408903b-084e-4a84-8945-9fa9b56b5b06",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Setup variables\n",
+ "**Mandatory**\n",
+ "\n",
+ "[Get your HubSpot Access token](https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key)\n",
+ "- `hs_access_token`: This variable stores an access token used for accessing the HubSpot API.\n",
+ "- `hubspot_id`: This variable stores the HubSpot company ID"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "6ab9199f-b054-459b-8bf0-bb23e941de67",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# Mandatory\n",
+ "hs_access_token = naas.secret.get(\"HS_ACCESS_TOKEN\") or \"YOUR_HS_ACCESS_TOKEN\"\n",
+ "hubspot_id = \"17450148694\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "3899ae6e-1e2b-4309-b87d-b9969feddef1",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Model"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1e734f5f-8b99-40a7-81d9-4d3a653d4e25",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Delete a company"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "355d61fe-19cf-496a-9453-3ca41bcf1bc7",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "obj = hubspot.connect(hs_access_token).companies.delete(hubspot_id)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "a5f649e9-2cff-4706-8fec-fdd9b7b8f882",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Output"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "f0a8524d-8580-407b-93f8-a5613dff4cf5",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Display result"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "336db21f-0533-47d2-8258-ad460c822e81",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "obj"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "38adb765-f897-45d8-a937-52555f116183",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.6"
+ },
+ "naas": {
+ "notebook_id": "758eceb0755d55869262781c0fdbf0ae8897488501d0c5a019bb29f299889448",
+ "notebook_path": "HubSpot/HubSpot_Delete_contact.ipynb"
+ },
+ "papermill": {
+ "default_parameters": {},
+ "environment_variables": {},
+ "parameters": {},
+ "version": "2.3.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/HubSpot/HubSpot_Get_company.ipynb b/HubSpot/HubSpot_Get_company.ipynb
new file mode 100644
index 0000000000..c083dc2284
--- /dev/null
+++ b/HubSpot/HubSpot_Get_company.ipynb
@@ -0,0 +1,265 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "african-pavilion",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "frequent-pittsburgh",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "# HubSpot - Get a company\n",
+ "
Give Feedback | Bug report"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "genuine-poland",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Tags:** #hubspot #crm #sales #company #naas_drivers #snippet #get"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1ca9ae0b-0121-49dd-ab85-246f17d69448",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Author:** [Florent Ravenel](https://www.linkedin.com/in/florent-ravenel/)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "19d62035-3dc4-435d-b968-b773157ca7aa",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Last update:** 2023-09-25 (Created: 2023-09-25)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "naas-description",
+ "metadata": {
+ "papermill": {},
+ "tags": [
+ "description"
+ ]
+ },
+ "source": [
+ "**Description:** This notebook demonstrates how to get a given company in using its hubspot ID."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0674efd4-cc2f-4795-aa85-f2f0461a5ed1",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**References:**\n",
+ "- [HubSpot CRM API - Companies](https://developers.hubspot.com/docs/api/crm/companies)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "decreased-discovery",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Input"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "outer-mechanism",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Import libraries"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "obvious-surgery",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "from naas_drivers import hubspot\n",
+ "import naas"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "bcf071a5-f2a8-4952-803b-d1abce07ca7d",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Setup variables\n",
+ "**Mandatory**\n",
+ "- `hs_access_token`: This variable stores an access token used for accessing the HubSpot API. [Get your HubSpot Access token](https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key)\n",
+ "- `hubspot_id`: This variable stores the HubSpot company ID\n",
+ "\n",
+ "**Optional**\n",
+ "- `properties`: List of properties (hubspot internal names) you want to get from a company. By default, you will get: name, domain, createdate, lastmodifieddate, hs_object_id. To list of contact properties, you can use this template: \"HubSpot/HubSpot_List_contact_properties.ipynb\" stored in https://github.com/jupyter-naas/awesome-notebooks"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "5a2f148d-7443-4ba0-9c3d-261a67003423",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# Mandatory\n",
+ "hs_access_token = naas.secret.get(\"HS_ACCESS_TOKEN\") or \"YOUR_HS_ACCESS_TOKEN\"\n",
+ "hubspot_id = \"179121906\"\n",
+ "\n",
+ "# Optional\n",
+ "properties = []"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "minor-white",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Model"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "fiscal-directive",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Get a company"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "phantom-people",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "obj = hubspot.connect(hs_access_token).companies.get(hubspot_id, properties)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "compressed-target",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Output"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4d39601c-e21c-4a3f-a0a4-f60b9354d490",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Display result"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "38410b82-6f46-48d4-8cd1-533f5a83f7fc",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "obj"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "9f31c2d2-ee78-48b2-bc80-b3c10f74da16",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.6"
+ },
+ "naas": {
+ "notebook_id": "1a66fd4eb09d5f34d95b8451ca85989c9743a9060a6540d11d2c19a559a516bb",
+ "notebook_path": "HubSpot/HubSpot_Update_contact_using_custom_properties.ipynb"
+ },
+ "papermill": {
+ "default_parameters": {},
+ "environment_variables": {},
+ "parameters": {},
+ "version": "2.3.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/HubSpot/HubSpot_Update_company.ipynb b/HubSpot/HubSpot_Update_company.ipynb
new file mode 100644
index 0000000000..835fa45a38
--- /dev/null
+++ b/HubSpot/HubSpot_Update_company.ipynb
@@ -0,0 +1,263 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "african-pavilion",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "frequent-pittsburgh",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "# HubSpot - Update a company using custom properties\n",
+ "
Give Feedback | Bug report"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "genuine-poland",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Tags:** #hubspot #crm #sales #company #naas_drivers #snippet #update #patch"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1ca9ae0b-0121-49dd-ab85-246f17d69448",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Author:** [Florent Ravenel](https://www.linkedin.com/in/florent-ravenel/)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "19d62035-3dc4-435d-b968-b773157ca7aa",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**Last update:** 2023-09-25 (Created: 2023-09-25)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "naas-description",
+ "metadata": {
+ "papermill": {},
+ "tags": [
+ "description"
+ ]
+ },
+ "source": [
+ "**Description:** This notebook demonstrates how to update a given company in HubSpot using HubSpot default or custom properties."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0674efd4-cc2f-4795-aa85-f2f0461a5ed1",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "**References:**\n",
+ "- [HubSpot CRM API - Companies](https://developers.hubspot.com/docs/api/crm/companies)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "decreased-discovery",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Input"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "outer-mechanism",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Import libraries"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "obvious-surgery",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "from naas_drivers import hubspot\n",
+ "import naas"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "bcf071a5-f2a8-4952-803b-d1abce07ca7d",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Setup variables\n",
+ "[Get your HubSpot Access token](https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key)\n",
+ "- `hs_access_token`: This variable stores an access token used for accessing the HubSpot API.\n",
+ "- `hubspot_id`: This variable stores the HubSpot company ID\n",
+ "- `properties`: This variable holds a dictionary that contains key-value pairs to update a company in HubSpot. You have the flexibility to include any custom properties, using their respective internal HubSpot names. To list company properties, you can use this template: \"HubSpot_List_company_properties.ipynb\" stored in https://github.com/jupyter-naas/awesome-notebooks."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "5a2f148d-7443-4ba0-9c3d-261a67003423",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "hs_access_token = naas.secret.get(\"HS_ACCESS_TOKEN\") or \"YOUR_HS_ACCESS_TOKEN\"\n",
+ "hubspot_id = \"17450148694\"\n",
+ "properties = {\n",
+ " \"name\": \"HubSpot (test)\",\n",
+ "} "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "minor-white",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Model"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "fiscal-directive",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Update company"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "phantom-people",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "hs_properties = {\"properties\": properties}\n",
+ "obj = hubspot.connect(hs_access_token).companies.patch(hubspot_id, hs_properties)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "compressed-target",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "## Output"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4d39601c-e21c-4a3f-a0a4-f60b9354d490",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "source": [
+ "### Display result"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "38410b82-6f46-48d4-8cd1-533f5a83f7fc",
+ "metadata": {
+ "papermill": {},
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "obj"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "9f31c2d2-ee78-48b2-bc80-b3c10f74da16",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.6"
+ },
+ "naas": {
+ "notebook_id": "1a66fd4eb09d5f34d95b8451ca85989c9743a9060a6540d11d2c19a559a516bb",
+ "notebook_path": "HubSpot/HubSpot_Update_contact_using_custom_properties.ipynb"
+ },
+ "papermill": {
+ "default_parameters": {},
+ "environment_variables": {},
+ "parameters": {},
+ "version": "2.3.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}