The invention relates to a method for machining a workpiece (12) comprising a first flow channel (14) and a second flow channel (16). The second flow channel (16) opens into the first flow channel (14). A depression (46) is configured around the opening of the second flow channel (16) into the first flow channel (14). Said depression (46) is configured using an electrochemical material machining process. Material is simultaneously removed from the edge formed by the depression (46) and the second flow channel (16) until a predetermined mass flux of the electrolyte solution used for the electrochemical material machining process has been achieved through the second flow channel (16).