Error: Cannot read properties of undefined - Branch

Hello,

I wnat to use a branch to filter API calls. I am using data input from a Segment Webhook. The parameters are correct, but I am getting this error on the Branch block:

(line 1) TypeError: Cannot read properties of undefined (reading 'properties')

Can you help me? Thanks

startTrigger.data?.value?.properties?.user_use_case == 'business'

try using that code

? character checks if every previous parameter exists.

chatGPT explains it in a better way))
https://chat.openai.com/share/ec1b95f7-9cf8-4d7f-bc80-2858dc1cb204

1 Like

Thanks, it works now!

2 Likes