Use directives like #each to create repeating sections, dynamic lists, and conditional content in Slack templates.
Directives generate dynamic content from your data at runtime. Add a Directive Container block, configure it, and the template expands automatically based on arrays or conditions — no need to manually create multiple blocks.
Use #if to show or hide content based on a value. Set Directive Type to #if, configure the Condition path (e.g. a boolean like has_error), and add child blocks. They render only when the condition is met.
The full Directives reference covers step-by-step instructions with screenshots, more examples (order items, team members, status dashboard, overflow), nesting directives, and common issues with troubleshooting.