Updating Database Email Profile for all notifications
I think what you're looking for is msdb.dbo.sysjobs and the notify_email_operator_id field specifically. If you can get the ID of the profile after creation, then you likely just need to update the table sysjobs references in a single UPDATE statement, on each instance you run your script on.