Thanks for posting. I was having issues using a different formula (split) but this worked for me.

If(ThisItem.IsFolder, 'Folder Icon', If(Find("xls",ThisItem.'File name with extension')>0,Excel, If(Find("docx",ThisItem.'File name with extension')>0,Word, If(Find("pptx",ThisItem.'File name with extension')>0,'Power Point', If(Find("onetoc2",ThisItem.'File name with extension')>0,'One Note', If(Find("one",ThisItem.'File name with extension')>0,'One Note', ThisItem.Thumbnail.Small))))))
Now I need to 1) figure out how to get the OneNote file that's showing as a folder to show the right icon and 2) get the file extension without using a split funtion.