#Japt, 61 59 92 bytes
I was working on this earlier but gave up when I read further down the post and realised conversion had to work both ways. Thankfully obarakon convinced me to take it up again.
Takes input as a string for both operations and returns a string for both as well or 0
for invalid input.
V="OIREASGTBP"UÉ?¡VgXÃe"%v"²_i1'NÃe"%V"²_i1'UÃ:Uè"%v%v|%V%V|[^OIREASGTBPNU]" ?T:Ur"N|U" £VaX
24 bytes saved thank to obarakon.- 33(!) bytes sacrificed implementing a quick fix (i.e., yet to be fully golfed) to check input validity.
##Try it
##Explanation :Implicit input of string U. V="..." :Assign the string of letters to variable V, in order. UÉ :Subtract 1 from U, which will give a number (truthy) if the input is a number or NaN (falsey) if the input is a string. ? :If it's a number then ¡ : Map over the input string, replacing each character (digit) with ... VgX : the character in string V at index X, the current digit. Ã : End mapping. e : Recursively replace ... "%v"² : every occurrence of 2 vowels (RegEx) ... _i1'N : with the current match with an "N" inserted at index 1. Ã : End replacement. e : Another recursive replacement of ... "%V"² : every occurrence of 2 non-vowel characters (i.e., consonants) ... _i1'U : with the current match with a "U" inserted at index 1. Ã : End replacement. : :Else, if it's a string then Ur"N|U" : Replace every occurrence of "N" or "U" in string U with nothing. £ : Map over the string, replacing each character (letter) with ... VaX : the index of the current character X in string V. :Implicit output of resulting string