The aim of this paper is to study the distribution of colours, {Xn}, in a generalized Pólya urn model with L colours, an urn function and a random environment. In this setting, the number of actions to be taken can be greater than L, and the total number of balls added in each step can be random. The process {Xn} is expressed as a stochastic recurrent equation that fits a Robbins—Monro scheme. Since this process evolves in the (L—1)-simplex, the stability of the solutions of the ordinary differential equation associated with the Robbins—Monro scheme can be studied by means of differential algebraic equations. This approach provides a method of obtaining strong laws for the process {Xn}.