If you want to use an external private key, you cannot use the publishfrom API, because this builds and signs the transaction in a single step, which is not possible if the private key is not in the node's wallet. Instead you should use the createrawsendfrom API as explained in that tutorial.