Detect animation / melee attack

I was thinking when you had a melee (e.g. sword) attack using an animation you could just use the animation state with an on overlap:

image
or
image

But I cannot find anything like this.
I know I can create a projectile that gets destroyed I just thought this might be a simpler way