Contract N1 interfaces method A in contract N2. Once method A in contract N2 successfully executes, it logs an event on the blockchain and it passes as argument the output of the method. You then use a service which monitors your contracts events (such as Openzeppelin Defender Sentinels) to catch the events of your contract, send you a webhook, parse the json of the webhook and use the output of method N2 to then call using web3.js contract N1.