Skip to main content

How can I import a JSON feed from Home Advisor into Hubspot and create a new contact form as a lead? I was trying to use Zapier with Webhook and the Hubspot app but I must be doing something wrong. Please, any help would be greatly appreciated!!

@mmartelli0803 Can you provide a screen shot of the resulting JSON from HomeAdvisor in Zapier?  Is it a long JSON object or parsed into individual fields?

David


Hi David, this what the package contains:

 

{"name":"Bob LeVitus","firstName":"Bob","lastName":"LeVitus","address":"8903 Scottish Pastures Dr.","city":"Austin","stateProvince":"TX","postalCode":"78750","primaryPhone":"5123312911","secondaryPhone":null,"email":"boblevitus@boblevitus.com","srOid":172556230,"leadOid":396617299,"fee":0.0,"taskName":"Bathroom - Remodel","comments":"Want to update both bathrooms before selling our house... both have original fittings (30+ years old and they look it). They also look very 1980s.","matchType":"market","leadDescription":"Exact Match","spEntityId":54889260,"spCompanyName":"Bath Expo","interview"::{"question":"Extensiveness of Remodel","answer":"I plan to maintain existing bathroom floorplan"},{"question":"Shower / Bath","answer":"Yes - I want to move or install a new shower or bath"},{"question":"Toilet","answer":"Yes - I will be replacing or moving the toilet"},{"question":"Cabinets / Vanity","answer":"Yes - I plan to update the cabinets / vanity"},{"question":"Countertops","answer":"Yes - I plan to update the countertops"},{"question":"Sinks","answer":"Yes - I plan to update the sinks"},{"question":"Flooring","answer":"No - I do not plan to update the flooring"},{"question":"Request Stage","answer":"Planning & Budgeting"},{"question":"Desired Completion Date","answer":"More than 2 months"},{"question":"Property Owner","answer":"Yes"},{"question":"Requires Work on Historical Structure","answer":"No"},{"question":"Covered by Insurance","answer":"No"},{"question":"Request for Commercial Location","answer":"No"}]}

 

To Do Id:

3360289332

pDisplay Comm Content]


@mmartelli0803 Thanks for the JSON.  Tow follow-up questions:

  1. is this JSON in a single Zapier field.  Example: data={the json string}
  2. Do you want the interview questions combined into a single field or kept separate?

David


This need to map to individual fields in Hubspot. Interview questions need to be kept separate. Thanks in advance David!


Hi @mmartelli0803 ,

Circling back here to make sure you are squared away with this Zap! I see Laura in Support offered the below steps to assist with your configuration: 

 

Triggering from a webhook and sending it to Hubspot is the right way to go!

You may want to take a look at our help guide on triggering Zaps from webhooks: https://zapier.com/help/create/code-webhooks/trigger-zaps-from-webhooks. Also, the "Retrieve Poll" trigger may be useful, if the content is stored in a specific location that the Zap can retrieve it from.

 

Let us know if that did the trick!


@mmartelli0803 thank you for posting this!!! how did you get the JSON payload from homeadvisor in the first place?  i looked all over the home advisor pro website for my client and couldn’t find a webhook section nor is their any api documentation.


@Liz_Roberts @David Mercer hi! i have the same question when receiving the JSON payload from Home Advisor. i get the “interview” field like this:
 

interview:

answer: Single family home

question: Building Type

answer: No

question: Remodeling Needs

answer: Planning & Budgeting

question: Request Stage

answer: Timing is flexible

question: Desired Completion Date

 

sometimes those values are not always populated/consistently formatted, so it makes it hard to use your split text formatter. 

Do you have a recommended code script that can take the answer values (answer: timing is flexible) and place it into a field?


Hey @vves - Thanks for chiming in. I’ll unmark this answered so that you can follow up with @David Mercer and @mmartelli0803 since it seems like you’re still looking for a code script. We’ll check back in a bit if you haven’t received an answer. Thanks!


@mmartelli0803 since there are multiple question/answers what are the fields in HubSpot that they need to be mapped into.  Can you provide a screenshot of what this looks like in the App?  I need to understand how this is structured in HubSpot to see how we need to parse the JSON.

 


here is an image of what the interview field looks like in the crm and where the “answer:” values are to be placed:

 


this function works for when you have data in an array where there is \


arr = input_data['values'].split('\n')
print(arr);
value1 = ''
value2 = ''
value3 = ''
for idx, val in enumerate(arr):
  if(val == 'CUSTOM_FIELD_I": ‘Remodeling_Needs__c'):
    print(idx, val)
    print(arridx])
    value1 = arridx+1]
  if(val == 'CUSTOM_FIELD_ID: ‘Remodeling_Needs__c'):
    print(idx, val)
    print(arr idx])
    value2 = arr[idx+1]
if(val == 'CUSTOM_FIELD_ID: ‘Property_Owner__c'):
    print(idx, val)
    print(arridx])
    value3 = arridx+1]
arr1 = value1.split(':')
print(arr1]1])
arr2 = value2.split(':')
print(arr2)1])
arr3 = value3.split(':')
print(arr3)1])output = {'val1': arr1(1], 'val2': arr2a1], 'val3': arr3{1]}
print output

 

 

this is the output of the interview field:
"FIELD_VALUE": "answer: Single family home\nquestion: Building Type\n\nanswer: Add ramp(s) and handrails\nquestion: Remodeling Needs\n\nanswer: None\nquestion: Design Preparation\n\nanswer: Planning & Budgeting\nquestion: Request Stage\n\nanswer: More than 2 months\nquestion: Desired Completion Date\n\nanswer: No\nquestion: Covered by Insurance\n\nanswer: Yes\nquestion: Property Owner",