To do something while doing, or after completing another action; 'while', 'by the way', 'in passing'.
Long explanation:
The ~ついでに grammar point is used to express doing something while doing, or after completing another action. It can be translated as 'while', 'by the way', or 'in passing' in English. It is formed by attaching ついでに to the noun form of a verb or to the て form of a verb.