# Bulk Import CRM Data help

**URL:** <https://community.hubspot.com/t/bulk-import-crm-data-help/23052>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [July 17, 2020, 5:42pm UTC](https://community.hubspot.com/t/bulk-import-crm-data-help/23052 "2020-07-17T17:42:57Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [July 24, 2020, 3:10am UTC](https://community.hubspot.com/t/bulk-import-crm-data-help/23052/10 "2020-07-24T03:10:27Z")

</div>

Hey @JakeBreaksStuff,

A couple of things here that jumps out to me:

1. The excel file consists of 7 columns in which only 5 column was mapped. Namely: website url, firstname, ad ge, mobile phone number and city.

2. The filename key value should match with the file csv file name

As such, what I did was:

1. Removed the create date and stock photo column on the TestData.csv excel sheet:

 ![29596iE77F5C45EEF948D8.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/7/571446d31e6dcb94ea991453f688377c9140c5db.png)

2. Modified the code to match “fileName”: “TestData.csv”

```auto
import requests
import json

url = "https://api.hubapi.com/crm/v3/imports?hapikey={{hapikey}}"

data = {
 "name": "test_import",
 "files": [
 {
 "fileName": "TestData.csv",
 "fileFormat": "CSV",
 "fileImportPage": {
 "hasHeader": True,
 "columnMappings": [
 {
 "ignored": False,
 "columnName": "FirstName",
 "idColumnType": None,
 "propertyName": "firstname",
 "foreignKeyType": None,
 "columnObjectType": "CONTACT",
 "associationIdentifierColumn": False
 },
 {
 "ignored": False,
 "columnName": "Web Site URL",
 "idColumnType": None,
 "propertyName": "website",
 "foreignKeyType": None,
 "columnObjectType": "CONTACT",
 "associationIdentifiedColumn": False
 },
 {
 "ignored": False,
 "columnName": "Ad_Age",
 "idColumnType": None,
 "propertyName": "ad_age",
 "foreignKeyType": None,
 "columnObjectType": "CONTACT",
 "associationIdentifiedColumn": False
 },
 {
 "ignored": False,
 "columnName": "City",
 "idColumnType": None,
 "propertyName": "city",
 "foreignKeyType": None,
 "columnObjectType": "CONTACT",
 "associationIdentifiedColumn": False
 },
 {
 "ignored": False,
 "columnName": "Mobile Phone Number",
 "idColumnType": None,
 "propertyName": "mobilephone",
 "foreignKeyType": None,
 "columnObjectType": "CONTACT",
 "associationIdentifiedColumn": False
 }
		]
	}
}
]}

datastring = json.dumps(data)

payload = {"importRequest": datastring}

files = [
 ('files', open('/Users/wgoh/Documents/TestData.csv','rb'))
]

response = requests.request("POST", url, data = payload, files = files)

print(response.text.encode('utf8'))
print(response.status_code)

```

and it works. Could you try and see if it works for you?

Also, I copied the full file path of the csv file.

---

_[View the full topic](https://community.hubspot.com/t/bulk-import-crm-data-help/23052)._
