HubSpot Ideas

taylorfriss

Export All Properties in CSV.

We just switched over to HubSpot from Salesforce and are trying to do an audit on which properties we have - so we can find duplicates and either merge or delete them. It would be great if we could export all existing Properties in our system with their Name, Description, Type, # Contacts w/ Value, Workflows Used In, Lists Used In, etc. 

105件のコメント
Lourdes
投稿者

Hubspot.  It's been years now.  Just throw up a link which exports to an Excel, and ideally, groups similar properties together.

First column lists the properties.
Second column indicates what group they are in (for example:  Names, Email Addresses, Phone Numbers, Street Addresses, etc.).   
Third column indicates whether the field is a Hubspot default field or a user-created field.

I'm sure there are other useful columns, but those three are a minimum.

Hubspot, don't let the perfect be the enemy of the good. You can improve it later!  Just get it done. 

(For anyone reading: the workaround now, mentioned a few times in this thread, is to export contacts and select "all properties".... the column headings give you the list of properties. Not ideal, but better than nothing).

 

 

Chris44
メンバー

Exporting users + ID's is a must.

 

Any connected system only gets the internal ID of a user name on a user property. So every time you have to mash it up. Very .... odd.

rwong
HubSpot Employee

Upvoting this on behalf of a customer. Looking forward to this idea becoming a reality! Some customers would like to review their properties offline in order to clean up unused properties or options.

danhammari
投稿者

Another upvote.

Would love to be able to export the metadata for a given entity

  • field label
  • field name
  • field type (e.g. integer, timestamp, varchar)

Of course, the next step would be to allow importing this set of metadata into another account

  • loop through list of fields
  • if field is not yet present in entity, add field
Katarina_Nice
参加者

I also would find this very useful, our properties need a review and I find the only solution is to manually copy and paste them each out into excel to perform an audit. This is not helpful for GDPR where we should really be able to have a good understanding of the data we hold on people to ensure this is easy for us to manage I do hope this is actioned soon.

HMill
メンバー

REALLY REAL HACK SOLUTION (Strap in kids! It's actually pretty easy...)

 

1.  Settings > Properties > Choose "Filter by:" of your choice (e.g. Contact Properties, Company Properties, etc.)

2. Scroll to bottom and change "10 per page" to "100 per page."

3. Highlight all the data in the list by clicking and holding your mouse/track pad while scrolling down.:

 

 

Screen Shot 2020-06-04 at 11.19.42 AM.png

 

 

 

 

 

 

 

 

 

 

 

 

4. Drop into Excel sheet. There will be merged cells, don't worry about them yet. If the first property doesn't line up with the rest, insert cells to push the data to align with the rest. It should look like this:

 

Screen Shot 2020-06-04 at 11.25.27 AM.png

 

 

 

 

 

 

 

 

 

5. Go to the next page of properties and repeat this process, dropping the next 100 under the first 100 in Excel.

6. Highlight the entire Excel sheet and unmerge all cells.

7. Sort the entire Excel sheet by values in column C. Your information should now be split by useful information and extra garbage, looking like the image below at the split. Your useful data rows should match how many properties are in listed in your "All Properties (#)" total. If not, you missed some while copying.:

 

Screen Shot 2020-06-04 at 11.28.50 AM.png

 

 

 

 

 

 

 

 

 

8. Delete all the garbage rows below your useful data. Add the header names back in if they didn't come over; Name, Group, Created by, Used in, etc.

9. Congratulations, you can now sort by the criteria of your choice.

 

Screen Shot 2020-06-04 at 11.47.47 AM.png

deldridge
参加者

Thanks for the idea HMill.   I did all those step before I decided to put in the suggestion for Hubspot to create export capablity.  All that work defeats the purpose of having a CRM, especially when you have over 300 properties.  The data is there, it should not be difficult for Hubspot to create export capability.  I'm surprised they still haven't completed it yet.

eteich
メンバー | Solutions Partner

Quick and DIrty Hubspot Property Export Script (php):

https://gist.github.com/eteich/1fc7b469d39be2586b94d9c71a4c3fd7

 

define("HUBSPOT_API_KEY", "YOUR_API_KEY");
$filename = 'hs-property-export.csv';
$objectTypes = [
		'Contact',
		'Company',
		'Deal',
		'Ticket'
];
$csvData = [];
foreach ($objectTypes AS $objectType) {
	$curl = curl_init();
	$archived = false;
	$curlOpt = [
			CURLOPT_URL => "https://api.hubapi.com/crm/v3/properties/" . $objectType . "?archived=" . $archived . "&hapikey=" . HUBSPOT_API_KEY,
			CURLOPT_RETURNTRANSFER => true,
			CURLOPT_ENCODING => "",
			CURLOPT_MAXREDIRS => 10,
			CURLOPT_TIMEOUT => 30,
			CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
			CURLOPT_CUSTOMREQUEST => "GET",
			CURLOPT_HTTPHEADER => [
					"accept: application/json"
			]
	];
	curl_setopt_array($curl, $curlOpt);
	$response = curl_exec($curl);
	$err = curl_error($curl);
	curl_close($curl);
	if ($err) {
		die("cURL Error #:" . $err);
	}
	$response = json_decode($response, true);
	$csvDataColumns = [
			'groupName',
			'name',
			'label',
			'type',
			'fieldType'
	];
	$optionDataColumns = [
			'label',
			'value',
			'description',
			'hidden',
			'label'
	];
	foreach ($response['results'] AS $idx => $result) {
		$row = [
				'is_option' => 0,
				'has_options' => (array_key_exists('options', $result) ? 1 : 0),
				'object' => $objectType
		];
		foreach ($csvDataColumns AS $csvDataColumn) {
			if (array_key_exists($csvDataColumn, $result)) {
				$row[$csvDataColumn] = $result[$csvDataColumn];
			} else {
				$row[$csvDataColumn] = '';
			}
		}
		foreach ($optionDataColumns AS $optionDataColumn) {
			if (array_key_exists($csvDataColumn, $result)) {
				$row['option_' . $optionDataColumn] = '';
			}
		}
		$csvData[] = $row;
		if (array_key_exists('options', $result)) {
			foreach ($result['options'] AS $option) {
				$row = [
						'is_option' => 1,
						'has_options' => '',
						'object' => $objectType
				];
				foreach ($csvDataColumns AS $csvDataColumn) {
					if ($csvDataColumn == 'name' || $csvDataColumn == 'groupName') {
						$row[$csvDataColumn] = $result[$csvDataColumn];
					} else {
						$row[$csvDataColumn] = '';
					}
				}
				$row['has_options'] = '';
				$row['is_option'] = 1;
				foreach ($optionDataColumns AS $optionDataColumn) {
					if (array_key_exists($optionDataColumn, $option)) {
						$row['option_' . $optionDataColumn] = $option[$optionDataColumn];
					} else {
						$row['option_' . $optionDataColumn] = '';
					}
				}
				$csvData[] = $row;
			}
		}
	}
}
$fp = fopen("php://memory", 'w');
$headers = array_keys($csvData[0]);
array_unshift($csvData, $headers);
foreach ($csvData AS $row) {
	fputcsv($fp, array_values($row));
}
rewind($fp);
$csv = stream_get_contents($fp);
fclose($fp);
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . $filename . '.csv";');
header('Content-Transfer-Encoding: binary');
exit($csv);
jakespirek
参加者

I agree this would be nice. Especially if you could export Name, Internal Name and Field Type.

 

An imperfect workaround: 

  1. Export a contact list
  2. Select All Properties

In your resulting spreadsheet, you'll have columns for all properties. Then just copy those headers and Paste as Transposed and now you have a list of all your properties. Doesn't solve things like knowing field types, but maybe a start?

 

Screen Shot 2020-06-30 at 10.21.33 AM.png

jakespirek
参加者

A slightly more advanced, but still pretty quick and easy, without any programming:

 

  1. Download Postman (postman.com) or something like it. 
  2. Set up a new GET request for: https://api.hubapi.com/crm/v3/properties/contacts
  3. In the Authorization tab, choose type: API Key.
    Key:
    hapikey
    Value: (Find your API key)
  4. Hit Send and then copy the results.
  5. Convert the resulting JSON to CSV (Parabola is a super easy way to do this if the file is too big. Just set up a new flow with JSON file, set Top Level Keys to results. Actually, if you use Parabola, just do an API import and you can skip Postman altogether!)

 

Screen Shot 2020-06-30 at 10.30.01 AM.png

jakespirek
参加者

Since Parabola is a super helpful tool for all my Hubspot work, I figured I'd mention how to set it up:

  1. Add an API Import step
  2. GET
    https://api.hubapi.com/crm/v3/properties/contacts?hapikey=INSERTYOURKEY
    (Find your API key)
    Set Top Level Key to results
  3. Add a CSV Export step
  4. Publish and run. Boom!

 

Screen Shot 2020-06-30 at 11.45.43 AM.png

Screen Shot 2020-06-30 at 11.44.09 AM.png

Dylan
HubSpot製品開発チーム

Hello HubSpot community, 

Thank you for your continued feedback here. I'm delighted to let you all know that this is something in active development and should be available soon. We'll update this post once it is in beta! 

- Dylan 

philipB
メンバー | Solutions Partner

Well done, jakespirek! This is the first answer I've seen that addresses the underlying problem with exporting fields and options. I struggled with finding a JSON-CSV converter that could handle the output appropriately, but https://www.coolutils.com/online/JSON-to-CSV worked for me because it created a results file and an options file as part of a ZIP archive it generated. Parabola gave me the same output/open errors as several other converters, though that's likely the result of my not knowing what additional parameters to provide. Anyway, very nice solution. Thanks!

ステータスに更新: In Beta
jeffvincent
HubSpot製品開発チーム

Hey all!

 

I'm excited to share we've implemented a Export Property Definitions feature, thanks to your feedback. You can now export all property definitions for your Contacts, Companies, Deals, and Tickets! Always nice to share some good news.

 

We don't have everything from Taylor's original request in the first release. Here are the columns included:

  • Name
  • Label
  • Type
  • Description
  • Group name
  • Form field
  • Options
  • Read only value
  • Read only definition
  • Calculated
  • External options
  • Deleted
  • Hubspot defined
  • Created user

This is in limited beta for a short period, and then we'll be rolling it out to all hubs over the coming weeks. Excited to see how you can use this to de-clutter your hub and reclaim master of your HubSpot domain.

philipB
メンバー | Solutions Partner

This is good news. How can we get into the beta? 

etellez
参加者

I second this idea

ステータスに更新: Delivered
jeffvincent
HubSpot製品開発チーム

Hi all!

 

The Export Property Definitions functionality is now available for Super Admins on all hubs.

 

To use it, navigate to Settings > Property Settings, and find the "Export all properties" link. Find more documentation here.

 

I look forward to your feedback!

Jeff Vincent

PM, CRM at HubSpot

 

 

Export property definitions linkExport property definitions link

travwhite
投稿者 | Diamond Partner
Thanks a tonne Jeff! Much appreciated from the HubSpot community! Was a tough 3 year campaign but we got there! Thank you again!
Jonno_Price
ガイド役 | Platinum Partner

Waiting with baited breath for an updated on this one.. Would be super useful. I have a property with over 500 options in dropdown that is in urgent need of review and editing. To be able to download this property with all options would be very helpful.

travwhite
投稿者 | Diamond Partner

It's been delivered Jonno... Xmas has come early 👏🏽