Msg.atachments with msg.payload input

Add `node.warn(msg.payload.adjunto) to the top of the function node and see if you get an error from that line and check the output in the debug side panel (or the node-red log if you prefer).

No idea, but the error is clear. Whenever I've had issues like that in the past, it was either because I mistyped the property name or I got a message that didn't actually have the data I thought it did.

Not really but then it isn't actually the array part that you are getting an error for, it is the property name itself. It doesn't think that property exists (undefined) so it can't give you the first element. Which is why I suggest putting in an extra statement to check.

Thought of one other possibility, that the property you think is named adjunto might have a non-printable character on it - or maybe has an extended character - somthing that isn't getting printed but that exists anyway? Still, the warn output is the first check.