When buying is the right answer
If the process is ordinary, if nobody internally will own the software long term, or if the organisation is likely to change how it works within a few years — buy. Custom internal software is a standing commitment, and the organisations that regret it are the ones that treated the build as the cost.