There is no obligation to notify the company of the pregnancy and, therefore, there is no established deadline for this.
However, the attendance to the medical tests performed for pregnancy control is a right that pregnant women have and this must be duly justified, so it will be necessary to communicate the pregnancy to the company to be able to enjoy this right. In addition, communicating the pregnancy sufficiently in advance allows the company to have time to organize itself for the future sick leave of the worker.
Some women decide to give notice early, especially if they find it difficult to hide the typical discomforts of pregnancy. Others wait until the end of the first trimester, when the risk of miscarriage is reduced.
In any case, if the work performed may pose a risk to the pregnancy, it should be reported as soon as possible.
Ideally, this should be done in writing and with acknowledgment of receipt, to the human resources department, personnel department or to management. Likewise, it is important to bear in mind that a woman cannot be dismissed simply because she has become pregnant.