First, although I've never used an M6 and SF20 combination, I have used other flashes in TTL mode. If my answers are incorrect because of some peculiarity in the M6 and SF20 combination, I'm sure I will be corrected.
Automatic flashes work by measuring how much light from the flash bounces back from the subject. When the right amount of light has bounced back, the flash is turned off. The full process happens in a tiny fraction of a second - usually much faster than any camera shutter.
TTL flashes use a sensor in the camera to measure that bounced light after it comes through the camera's lens. Non TTL automatic flashes use a sensor on or attached to the flash.
In the days of manual flashes, we would measure the distance from the flash to the subject, and that, with the power rating of the flash, would determine what f/stop to set. The closer the flash to subject distance, the smaller the aperture.
The shutter speed has no effect on the intensity of the flash - you just need to make sure it is a speed that works with flash. Unless you have high ambient light, the shutter speed plays no role in exposure.
For an automatic flash, the aperture set on the lens does two things:
1) it affects your depth of field, just like in non-flash work; and
2) it affects the maximum range of the flash.
The table or indicator on the back of the flash will, in combination with the film speed, tell you within what range the automatic function will work when the indicated aperture is set.
Most TTL flashes will let you choose a range of apertures - you just need to remain aware of the range of distances that will give you.