Need circuit to close switch on detecting current (12V)
You actually can do this with two resistors. Connect a 7kohm resistor from the signal line to your pin. Then connect a 5k resistor from your pin to your ground.(This is for 5V input, if you have 3.3 us a ~4k and a ~8k)

When 12V is input, it will show up as the logic level the chip knows, when 0V is there you will get 0V on the pin.