Bootloop issues are very common, which occur while flashing either a new mode or a custom build. This even leads to editing a root-level file due to some compatibility issue. It becomes quite annoying when the device encounters bootloop repeatedly while flashing a new ROM .
XDA forum member, Julian_os, has created a tool called Flash 5.0 N5 Tool, which can flash stock Android 5.0 Lollipop firmware (with build LRX21O) on Nexus 5 automatically in just two minutes, reports XDA.
The member says the tool can be used if the Nexus 5 is in bootloop/bootloader mode or even in normal state. This is the initial release of the tool and the member promises to issue updates with the new Lollipop builds, such Android 5.0.1, later.
He claims to have tested this on his Nexus 5 from bootloop/bootloader and from normal state with bootloader locked and sometimes even with the unlocked bootloader.
Below is the download link to Flash 5.0 N5 Tool. After downloading, just unzip it to a folder on your desktop and open instruction.txt. Head over to the development thread to know more about the flash 5.0 N5 Tool.
Download link (Dropbox): Flash 5.0 N5 Tool