I'm trying to get the file attachment extension from a file uploaded as an attachment to SP List using last(split(Check_if_Request_has_Attachments()?['file']?['name'], '.')) in a compose action.

It fails with

I have tried many many many variations of last(split(Check_if_Request_has_Attachments()?['file']?['name'], '.')) for hours now, nothing works, fails every time.