Preheat the oven to 350°F.
Add all of the dry ingredients in a large mixing bowl and mix well.
Place the wet ingredients in a high-speed blender or food processor and blend until smooth, then transfer to the mixing bowl with the dry ingredients and stir well. If the dates need to be softened first, soak them in water for 10 minutes and discard the water before using them.
Grease an 8-inch x 8-inch baking pan with coconut oil and pour in the mixture. Sprinkle the almond flakes on top and bake for 25 to 30 minutes. When you take them out, they might feel too moist in the middle, but they will firm up as they cool.
Store in an air-tight container for up to a week in the fridge. Enjoy!