I have created a SharePoint 2010 workflow to send an email on list. when I add item into list using code, it not triggers the workflow. however when I enter Item manually it works fine.
A common issue is that workflow not starting automatically as System Account. So don't run the code with system account.
Similar issue post for your reference: