Use OnComponentSavePost Event to check the moment when component entered the workflow.
...
public Constructor()
{
EventSystem.Subscribe<Component, SaveEventArgs>(OnComponentSavePost, EventPhases.TransactionCommitted);
}
...
Not all components are connected to a workflow. If the workflow process attribute is set to tcm:0:0:0 that means component is not connected to any workflow and the code shouldn't execute. You can find the workflow process attribute in components xml. Because only manual activity can be entered first in the workflow put some dummy manual activity with characteristic name so you can identify it in the code, again not all manual activities should enter you code only the one you created for this. Use something like this:
private void OnComponentSavePost(Component component, SaveEventArgs args, EventPhases phases)
{
String activityInstanceId = String.Empty;
XmlElement xmlElement = component.ToXml();
XmlNamespaceManager xmlNamespaceManager = new XmlNamespaceManager(new NameTable());
xmlNamespaceManager.AddNamespace("tcm", "http://www.tridion.com/ContentManager/5.0");
activityInstanceId = xmlElement.SelectSingleNode("//*[local-name()='ActivityInstance']", xmlNamespaceManager).Attributes["xlink:href"].Value;
if (!activityInstanceId.Equals("tcm:0-0-0"))
{
ActivityInstance activityInstance = new ActivityInstance(new TcmUri(activityInstanceId), component.Session);
if (activityInstance.Position == 1 && activityInstance.Title.Contains("SOMETHING CHARACTERISTIC IN FIRST MANUAL ACTIVITY NAME"))
{
//enter code here
}
}
}
P.S. Tridion 2013SP1 allows using first automatic activity only for Bundles. There is a patch in HR1 that enables this.