How to read pinout of this SPDT relay G8N-1F
Pins 2 and 5 are the coil. Pin 4 (also called Normally Closed, or NO) connects to pin 1 (known as the Wiper, W) when the coil is not energised. When it is, W connects to pin 3 (Normally Open, NO).