Notice that Judas was not predestined to betray Jesus.

The devil put it in the heart of Judas to betray our Lord.

The devil cannot put anything into our hearts directly. He uses the power of suggestion corrupting our minds to entertain doubts and wrong ideas.

No one knows what Judas was thinking but it has been speculated that he believed that Jesus is the Messiah and he simply wanted to force Jesus` hand to reestablish the throne of David.

In any event, his thoughts and our thoughts are either inspired by the HolySpirit or by Satan.