In this paper the Weyl tensor is used to define operators that act on the space of forms. These operators are shown to have interesting properties and are used to classify the Weyl tensor, the well known Petrov classification emerging as a special case. Particularly, in the Euclidean signature this classification turns out be really simple. Then it is shown that the integrability condition of maximally isotropic distributions can be described in terms of the invariance of certain subbundles under the action of these operators. Here it is also proved a new generalization of the Goldberg-Sachs theorem, valid in all even dimensions, stating that the existence of an integrable maximally isotropic distribution imposes restrictions on the optical matrix. Also the higher-dimensional versions of the self-dual manifolds are investigated. These topics can shed light on the integrability of Einstein's equation in higher dimensions.