I'd like to make an Eldritch Invocation for warlocks that allows you to make a weapon attack and cast eldritch blast at that same target:
Eldritch Strike
Prerequisites: 5th level, eldritch blast cantrip
Once per turn, when you make an attack with a one-handed melee weapon, you can cast eldritch blast as a bonus action. You must make a separate attack roll for eldritch blast, and it must target the same creature you attacked with your melee attack. You can only use this if your melee attack hit.
Balance Assessment
I think this is balanced because you must have one hand open to cast, it takes your bonus action, it's not a guaranteed hit for the Blast, and you can only use it on the creature you targeted. It's not able to be used to hit a different creature, and your original attack had to hit.
Best Answer
Eldritch Strike is unbalanced
In an nutshell, Eldritch Strike allows a properly built warlock to benefit simultaneously from the invocations that improve weapon attacks and invocations that improve Eldritch Blast.
Moreover, it lets the warlock harness more damage from Hex and Hexblade's Curse.
This all adds up to a significant boost in power.
Eldritch Strike comes with problems, some of which you mentioned in your balance assessment, but these problems are either minor, avoidable, or both:
For a rough comparison, consider the Bonus actions granted by Two Weapon Fighting, Polearm Master, or Maddening Hex. Eldritch Blast becomes way stronger than any of those Bonus Actions once it gets multiple beams and Agonizing Blast.
Another rough comparison is Sorlocks as they can also cast Eldritch Blast as a bonus action. However, they must spend 2 sorcery points to do so, whereas Eldritch Strike is at will.
If I were to build a warlock to make the most out of Eldritch Strike I would create a Pact of the Blade Hexblade with Mobile, Agonizing Blast, Eldritch Strike, Lifedrinker, and Thirsting Blade.
In the endgame this warlock deals (1d8 + cha*2)*2 + (1d10 + cha)*4 = 71 at will damage per turn, but the warlock can deal another 6*6 from Hexblade's Curse and 6d6 from Hex for a total of 128 damage.
Roughly 1 in 5 turns the warlock can't cast Eldritch Blast due to missing both melee attacks, so the adjusted damage is 64 at will and 112 with resources.
Just for reference, a typical melee Pact of the Blade Hexblade with a glaive, Polarm Master, and the relevant invocations deals (1d10 + cha*2)*2 + (1d4 + cha*2) = 43.5 at will damage per turn or 72 with resources.
The warlock might occasionally get some extra reaction damage from the Polearm Master feat, but it won't make up the difference.