Do I need training to work near but not in an excavation?

Yes. There are many hazards to persons in an excavation created by activities not performed in the excavation itself such as operating heavy machinery near the opening or objects falling into the excavation.