An automatic packaging machine for filling a bag made of a heat-sealable material and having an open upper end with a dose of a loose product; the packaging machine comprising: a packaging conveyor; a pick-up head, which is supported by the packaging conveyor so as to be fed along a packaging path lying on a horizontal plane, that is designed to grab and hold the bag along the packaging path, and comprises a pair of first clamps, which are opposite one another and are designed to grab opposite side ends of the corresponding bag; an input station, which is arranged at the beginning of the packaging path and where the empty bag is grabbed by the pick-up head; an output station, which is arranged at the end of the packaging path and where the full, sealed bag leaves the pick-up head; a filling device, which is movable along the packaging path and is designed to feed the product dose into the bag through the open upper end; and a sealing device, which is movable along the packaging path and is designed to seal the full bag through a sealing at the area of the open upper end; the packaging machine being characterized in that: the filling device and the sealing device are both mounted on the packaging conveyor so as to move together with the pick-up head along the entire packaging path; the filling device and the sealing device are arranged on the packaging conveyor next to one another along a horizontal selection direction, which is transverse to the packaging path; and the pick-up head is movable on the packaging conveyor so as to transfer, along the selection direction, between a filling position, in which the pick-up head is aligned with the filling device, and a sealing position, in which the pick-up head is aligned with the sealing device. a packaging conveyor; a pick-up head, which is supported by the packaging conveyor so as to be fed along a packaging path lying on a horizontal plane, that is designed to grab and hold the bag along the packaging path, and comprises a pair of first clamps, which are opposite one another and are designed to grab opposite side ends of the corresponding bag; an input station, which is arranged at the beginning of the packaging path and where the empty bag is grabbed by the pick-up head; an output station, which is arranged at the end of the packaging path and where the full, sealed bag leaves the pick-up head; a filling device, which is movable along the packaging path and is designed to feed the product dose into the bag through the open upper end; and a sealing device, which is movable along the packaging path and is designed to seal the full bag through a sealing at the area of the open upper end; the packaging machine being characterized in that: the filling device and the sealing device are both mounted on the packaging conveyor so as to move together with the pick-up head along the entire packaging path; the filling device and the sealing device are arranged on the packaging conveyor next to one another along a horizontal selection direction, which is transverse to the packaging path; and the pick-up head is movable on the packaging conveyor so as to transfer, along the selection direction, between a filling position, in which the pick-up head is aligned with the filling device, and a sealing position, in which the pick-up head is aligned with the sealing device. the filling device and the sealing device are both mounted on the packaging conveyor so as to move together with the pick-up head along the entire packaging path; the filling device and the sealing device are arranged on the packaging conveyor next to one another along a horizontal selection direction, which is transverse to the packaging path; and the pick-up head is movable on the packaging conveyor so as to transfer, along the selection direction, between a filling position, in which the pick-up head is aligned with the filling device, and a sealing position, in which the pick-up head is aligned with the sealing device.