The Bait Inside The Trap
Meat and feces attract flies the most as they lay their eggs/larvae inside them. If you think of using meat as bait, do not keep it inside your house, as it will produce a pungent smell. Flies are attracted to all the decaying fruits and vegetables.
You can use a slightly over-ripe fruit or vegetable as bait; also, try adding some sugar and water if the temptation does not trick the flies.
Fruit-scented dish-soaps can also be bait. It is best to place the trap outside the house so that the flies do not come inside your home. Adding a splash of apple cider vinegar can also help in this process.
Flies are also attracted to beer and liquor, so you can place some old beer bottles outside your house and add some dish soap into them. The narrow neck of the bottle will keep the flies trapped.
Some Tips To Make The Flytrap Work

You must have noticed that flies are prevalent mainly during the summer season. During the spring season, the walls of our houses start getting warmer, attracting the first flight from the winter stupor.
Flies have a very predictable and particular lifecycle. The life cycle includes many hatch seasons. So to keep all the flies at bay, you must set the trap as soon as you notice the first fly. This way, you will minimize any sort of fly outbreak as this way you will prevent them from laying eggs by which they fuel their next cycle.
You will have to empty the trap full of dead flies regularly and rebate the trap. If you live near animal farms or have a farm of your own during the summer season, you might have to take multiple fly traps to keep the flies out of your field. Also, be cautious while using meat as bait because they might contain larvae in it, who will have to destroy the larvae first before cleaning your trap.
Conclusion
To sum up, everything so far, and this trap can also eliminate wasps during the summer season if you use sweets as bait. Also, make sure there are no gaps between the funnel because flies can squeeze out of them, so tape the container tightly. You can use warm water to clean the trap, destroying any larvae inside the bait.