I believe it was a lesser relative of the flying spaghetti monster. Truly a horrendous and formidable enemy as we saw.
Seriously, though, maybe it was something similar to Sasori. Only written by the filler script writing monkeys and thus infinitely worse. Or maybe it was some lesser demon, much lesser than the bijuu.