Look for blkmond; it's a simple Python script that watches the Bitcoin network and can be customized to run an external program when a transaction is received.
Is it possible to trigger already with 0 confirmations? Or only with new blocks coming in, so at least 1 confirmation? (Or do i still have a totally wrong understanding of how this works
)