Are the berries of elderberry tree edible?

The berries of the elderberry tree (Sambucus) are edible for some species of elderberry but must be cooked before consumption. Elderberry berries contain a type of cyanogenic glycoside called sambunigrin, which can release cyanide when eaten raw. However, when cooked properly, the elderberries are safe to consume and are often used to make jams, jellies, pies, and other foods. It's important to consult a reliable source or expert to determine which species of elderberry is safe to consume and to follow proper preparation instructions to ensure the berries are cooked thoroughly.