Have a notion to (do something)

To feel tempted or inclined to do something.

I had a notion to go to the beach so I went to the beach.