How do I build a switch to automatically control my shop-vac?
Electrically it's easy.
 But, doing it for less that the $45 iVac would be hard.
 Cost your labour at $0.10/hour and no problem.
 Parts cost of electronics is modest. 

Here is a word picture of how you might do it.
 I won't add a circuit diagram as I don't really think this is advisable given what is available.

This operates at say about 12 VDC. Whole thing could be done at mains voltage. Usues relays. Could be wholly sold state.

Mains to 10 VAC or so transformer. Supplied from saw power feed.

Rectify 10 VAC to DC and regulate to say 12V DC.

Provide "mains on" signal for one diode connected to 10 VAC upstream of main rectifier. 

When 12 VAC appears a capacitor is charged via a diode and a resistor R1from "mains-on". Charge time ~~= R1 x C.

When "mains-on" disappears the capacitor is discharged via a second diode and a second resistor R2. Charge time ~~= R2 x C.

Adjust R1 and R2 to suit desired times.

Drive a MOSFET gate from capacitor so it is turned on ~R1C after mains-on and off R2C after mainson disappears.

Operate relay for vacuum from MOSFET.
 relay is 12 VDC and 12 VDC supply must hold up long enough to keep relay held in for vacuum to post operate. There are other ways. 

QED