Recruiting a spy costs 250 wood and 250 iron. 50 of these means you need to have 12,500 wood and 12,500 iron. Keep completing quests in the second from left quests tab under achievements, until you unlock the quest for mobilising 50 spies. Then do so, go back to achievements, and claim your reward to earn the achievement.