Help Webhoock parsing

Hello there :slight_smile:

I’m receiving the following webhoock, but can’t parse the data in order to map the data in the body > notif .

I tried with item list and some example found in code node to try to acces the data without succes.

"Sellsy Webhook v2.0 - curl",
"Sellsy Software",
"[email protected]=0-0-1045615-170427675-dd5bb969da3850c0-6c093028170c458d-1-1.486727-1669295145814",

I’m trying to map and be able to work withe the eventType, timestamp, …


I tried to use the code node with item.entries = JSON.parse(item.query.entries);
return item;
but getting an error ( I’m totally beginner in JS)

Welcome to the community @NicolasC!

You can use:


or in a Code-Node:

return [
    json: JSON.parse($input.first().body.notif)

Thanks for your answer @jan,
still getting an error with the code-node but will test around in order to get it :slight_smile:

Problem in node ‘Code2‘

I’m testing in desktop on mac.
Cannot read properties of undefined (reading ‘notif’) [line 2]

TypeError: Cannot read properties of undefined (reading 'notif')
    at /private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/
    at /private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/
    at VM2 Wrapper.apply (/private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/
    at (/private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/
    at Sandbox.runCodeAllItems (/private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/
    at Sandbox.runCode (/private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/
    at Object.execute (/private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/
    at Workflow.runNode (/private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/
    at /private/var/folders/9k/5j8f1sl97zdblz5yqzrs89wc0000gn/T/AppTranslocation/8C8026CD-0A55-429A-80C1-3C0DF51C26E0/d/

Hi @NicolasC, could you try using the snippet below instead? I believe there might have been a .json missing along the way:

return [
    json: JSON.parse($input.first().json.body.notif)

Or as a full workflow:

This works fine on the current version of the desktop app for me:


Thanks a lot :slight_smile: work perfectly ( and sorry for not understanding this directly , I need to read and learn JS, it will be usefull :wink: )

1 Like

Awesome, glad to hear this helps! And yes, things can be a bit tricky. Though hopefully you won’t need JS too often when using n8n :smiley:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.