APIs & Integrations

bcbotxo
Member

Extract Form Submissions Automatically to Excel

SOLVE

Hello everyone,

 

I have multiple forms on Hubspot and I am trying to get the number of form submissions each month and automatically store this into an excel file. Where my data updates at the end of each month. Basically, I need an API to extract the data. Could somebody please help me with this?

0 Upvotes
1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

Extract Form Submissions Automatically to Excel

SOLVE

Hi @bcbotxo 

 

Great question!

I believe the Get analytics data for specific objects endpoint may be of use here, see here:

https://developers.hubspot.com/docs/methods/analytics/get-analytics-data-by-object

 

This endpoint allows you to request specific data in relation to an object. For form data, you can use the following request:

 

https://api.hubapi.com/analytics/v2/reports/forms/total?hapikey=xxxx&start=20180101&end=20190531

You'll want to ensure you're customising the time constraints set by the use of &start=xx and &end=xx.

 

Once this call is made, you'll receive a response along the lines of the following:

{
    "offset": 5,
    "total": 5,
    "totals": {
        "submissions": 21,
        "formViews": 56,
        "installs": 8,
        "visibles": 38,
        "interactions": 6,
        "submissionsPerFormView": 0.375
    } 

//Further breakdowns will be provided but have been removed from this snippet.

You can then extract and use the above data as you'd like.

 

Thanks,

Matt

 

Product Manager @ HubSpot

View solution in original post

3 Replies 3
Willson
Solution
HubSpot Employee
HubSpot Employee

Extract Form Submissions Automatically to Excel

SOLVE

Hi @bcbotxo 

 

Great question!

I believe the Get analytics data for specific objects endpoint may be of use here, see here:

https://developers.hubspot.com/docs/methods/analytics/get-analytics-data-by-object

 

This endpoint allows you to request specific data in relation to an object. For form data, you can use the following request:

 

https://api.hubapi.com/analytics/v2/reports/forms/total?hapikey=xxxx&start=20180101&end=20190531

You'll want to ensure you're customising the time constraints set by the use of &start=xx and &end=xx.

 

Once this call is made, you'll receive a response along the lines of the following:

{
    "offset": 5,
    "total": 5,
    "totals": {
        "submissions": 21,
        "formViews": 56,
        "installs": 8,
        "visibles": 38,
        "interactions": 6,
        "submissionsPerFormView": 0.375
    } 

//Further breakdowns will be provided but have been removed from this snippet.

You can then extract and use the above data as you'd like.

 

Thanks,

Matt

 

Product Manager @ HubSpot
bcbotxo
Member

Extract Form Submissions Automatically to Excel

SOLVE

Hey Matt,

 

Thank you for your reply. I am trying to do this in python, however I am not that familiar. Could you please guide me on how I would do this. 

 

Cheers,

Sam

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Extract Form Submissions Automatically to Excel

SOLVE

Hi Sam (@bcbotxo),

 

Unfortuntely I would not be the best resource to do a full walkthrough here, but I am more than happy to look into specific questions and any roadblocks you encounter.

 

Thanks,

Matt

Product Manager @ HubSpot
0 Upvotes