There are different ways to get spell ids (during a boss fight)
- tracking CLEU events by NPC id/name or with addons like MobSpells, etc. Of course you want to use savedvariables
- looking at /etrace but not feasible for CLEU
- manually checking WoWCombatLog.txt with /combatlog or parsing by warcraftlogs.com, etc
- Wowhead and WowDB but less reliable compared to getting the data yourself