Hi there
First post here, i hope i did not miss the presentation topic
Iโm facing an issue with the combination between a webhook and the function node to parse the result from the webhook
Iโm a marketer with some coding skill, but in Python
The webhook comme from Albacross and look like this :
{
"timestamp": 1560853854297,
"name": "Lead Name",
"country": "GB",
"duration": 16548,
"address": {
"address": "Street 123" | null,
"city": "London" | null,
"zip_code": "12345" | null,
"state": 'London' | null
},
"contacts_url": "https://app.albacross.com/profile/ALBA~LEAD-NAME/contacts",
"employees": {
"from": 10 | null,
"to": 50 | null,
"year": 2019 | null
},
"financial_report": {
revenue_from: 10000001 | null,
revenue_to: 50000000 | null,
"currency": "EUR" | null,
"year": 2019 | null
},
"founded_at": 2013 | null,
"gclids": ["CjwKCAjw"],
"industry_category": "COMPUTER HARDWARE" | null,
"industry_code": "3" | null,
"last_visit": 1571395887605,
"nace_code": "6201" | null,
"nace_text": "Computer programming activities" | null,
"number": 'GB00000001',
"pages_visited": 361,
"visits": 121,
"website": "domain.com" | null,
"pages": [
{
"key": "/lead/all",
"value": 6,
"value_percentage": 1.66
}
],
"phone_number": {
"country": "GB" | null,
"country_code": 440 | null,
"number": "+44 123 456 789 | null"
},
"profile_url": "https://app.albacross.com/profile/ALBA~LEAD-NAME",
"utms": {
"sources": ["invite"],
"mediums": ["email"],
"campaigns": ["report"],
"terms": ["leads_page"],
"contents": []
},
"contacts": [
{
"email": "[email protected]",
"first_name": "John" | null,
"last_name": "Doe" | null,
"position": "senior" | null,
"department": "it" | null,
"phone_number": "+44 123 456 789" | null,
"linkedin": "https://www.linkedin.com/in/john-doe/" | null
}
]
}
My function looklike this :
return JSON.parse(items[0]);
And I get an error. I also tried some function found here in the forum, without success.
Can someone help me ?