A consumption level function will run up to 10 minutes while a premium function will run up to 4 hours. Re-working your plugin logic into an Azure function is a technically sound approach.