Hubspot API - Create Import Not working

Hi, I'm trying to build a workflow that integrates with Hubspot's Import API. It seems like there is a bug with the connector, in particular the files attribute of the component:


Is the files attribute supported to take in a similar object as the REST form? In other words, say I have a data object foo like

  "data": "YOUR CONTENT HERE",
  "name": "foo.csv",

If so, Hubspot 4xxed with the input {{data}}, showing in its request log:

Content-Disposition: form-data; name="files"

{"data":"user_id,user_email,csv continues","name":"foo.csv","type":"text/csv"}

If I change my input to just do the data above, e.g. `{{}}, I get:

Content-Disposition: form-data; name="files"

user_id,user_email,csv continues

That also 4xxed. While closer to the "correct" request, it is missing the filename, which the API needs as part of its API call.

Is this a bug?

Ultimately, like my other issue posted recently, I had to recreate the API call with a python request code block, exposing my credentials within the Workflow. :(. Python code snippit here:

import requests
import json

url = ""
headers = {'Authorization': 'Bearer 12345'}

output = []
for file in
    files = {'files': (file['name'], file['data'], 'text/csv')}
    data = {'importRequest': json.dumps( }

    response =, files=files, data=data, headers=headers)
    # Handle the response
    if response.status_code == 200:
      response_json = response.json()
      return response_json;

return output

Is there a better place to report issues such as this?

@Andrew_Holbrook Hi Andrew, sorry but we're not supporting binary format for Hubsport resource yet. You can work around this by using Rest API to interact with HubSport API manually.

We have a ticket tracking this issue & I'll add this to the ticket so we can prioritize them for future improvements!