I've had that feeling of knowing you're going to have a drink. Even after a period of abstinance, I would plan my next drink. I have no idea why. Except maybe that I'm an alcoholic and that's what alcohols do.
I made many such attempts at sobriety. Years worth. So don't be to hard on yourself.
I tried and failed to stay sober many, many times. So you're not alone.
I don't even know if willpower plays a part in it. I guess it does, but when I was drinking I had none.
Just learn from your experience and pick yourself back up and try again. The only failure is to stop trying.
Wishing you the best.