I've built a variety of designs over the past 9 months for automated defenses.
The easiest so far, and the fastest I've seen so far, is the "magma door" defense.
The design is simple. Here's a top down view of the primary entrance hallway:
WWWWWWWWWWWWWW
GGDGGDGGDGGDGG
WWWWWWWWWWWWWW
GGDGGDGGDGGDGG
WWWWWWWWWWWWWW
GGDGGDGGDGGDGG
WWWWWWWWWWWWWW
GGDGGDGGDGGDGG
WWWWWWWWWWWWWW
W = wall
G = floor grate
D = door
in the Z levels below this, under the entire 14 x 7 is the drain for the magma
in the Z level above this, above the center 8 doors, are channeled paths downward which are filled with pressurized magma
Goblins (or whomever else) walk/fly in and when they open either of the middle two doors in their chosen hallway, the magma flows immediately from above, and down through the grates to the drain below. Some magma also flows to the sides, and is contained by the other doors.
I'd be happy to provide a demonstration save, just PM me. My most recent build of this system has netted 2300 casualties in 18 years.
A retractable bridge-floor on the same z-level as the magma-supply-channels allows for precise control of the system.
A bonus feature of this design is that goblin leaders are killed invariably within a recently/temporarily magma filled hallway, so all their squad followers want to "be there" and thusly path to that area and are also subsequently vaporized when they open the doors to access it.
I have seen two 80 goblin sieges dispatched "back to back" in under 2 minutes of real time with this design.