Send deals to gsheet
Tags: #hubspot #crm #sales #deal #naas_drivers #gsheet
Author: Florent Ravenel

Input

Import libraries

1
from naas_drivers import hubspot, gsheet
Copied!

Setup your HubSpot

👉 Access your HubSpot API key
1
HS_API_KEY = 'YOUR_HUBSPOT_API_KEY'
Copied!

Enter contact properties you want to be returned

1
properties_list = []
Copied!

Setup your Google Sheet

Pre-requisite: share your Google Sheet with our service account For the driver to fetch the contents of your google sheet, you need to share it with the service account linked with Naas. 🔗 [email protected]
1
spreadsheet_id = ""
2
sheet_name = ""
Copied!

Model

Get deals

1
df_deals = hubspot.connect(HS_API_KEY).deals.get_all(properties_list)
Copied!

Output

Send contacts to gsheet

1
gsheet.connect(spreadsheet_id).send(
2
sheet_name=sheet_name,
3
data=df_deals,
4
append=False
5
)
Copied!
Copy link
Edit on GitHub