He studied canon and civil law in the University of Pisa and became canon of the cathedral chapter of Florence. Later he was made relator of the Sacred Congregation of good government in the pontificate of Pope Clement IX. Then he was appointed referendary of the Tribunals of the Apostolic Signature of Justice and of Grace and governor of Faenza (later of Spoleto and vice-legate in Ferrara). He was ordained priest on 8 September 1675.
He was elected titularLatin Archbishop of Corinth on 9 September 1675. On 20 September 1675 he was appointed Apostolic nuncio in Poland, a post he held for six years.[2] During his time in Poland he dealt with diplomatic issues on behalf of the King John III Sobieski of Poland and neighboring countries, working to form alliances with an anti-Turkish interest.[3]