This post is a duplicate to this post : [How to find the id of the last added feature using pyQGIS?][1] The answer is the exact same one. Sorry! [1]: http://gis.stackexchange.com/questions/102376/how-to-find-the-id-of-the-last-added-feature-using-pyqgis