We had talked about something similar and couldn't get it completely automated. The best idea we came up with was a separate course for instructors where there was a set of quizzes where they could "apply" for their badges. The quiz essay question was set up so that they would copy and paste in the URL of the activity they wanted to count toward the badge. The quiz had to have someone manually "grade" or look at the activities to make sure they were correctly reported and examples of the activity for which the instructor was applying. When the person "grading" this quiz gave a grade, then the activity was complete and the badge would be awarded.