Hey all!
I have an extremely simple app that I created in Flask. Here’s my end goal: Create a CRM Card that has a link back to my App with a couple of variables from the Company. This seems to work perfectly fine if I do not include any variables and type in a hardcoded URL. The moment I change the URL to include variables, I get a Response deserialization error.
Here’s the code:
@app.route('/google-scan')
def google_scan():
try:
company_name = request.args.get('name')
except Exception:
company_name = 'unknown'
try:
city = request.args.get('city')
except Exception:
city = 'unknown'
try:
state = request.args.get('state')
except Exception:
state = 'unknown'
try:
zip = request.args.get('zip')
except Exception:
zip = 'unknown'
link = 'https://[MY_URL].com/search/' + company_name + '/' + city + '/' + state + '/' + zip
data = {
'results': [
{
'objectId': 1,
'title': "Google Search",
'link': link,
}
]
}
response = make_response(data, 200)
response.headers['Content-Type'] = 'application/json'
response.headers['accept'] = 'application/json'
return response
You might be wondering if I’m getting exceptions at every request.args.get(‘variable’). I’m not. The data is being passed from HubSpot to my app. Again, I’m not sure why the link works fine if it is hard-coded, but not when I include variables. Any insight would be appreciated!



