New Gitlab project, automatically new jenkins task

I want to implement when a gitlab project is created, a new jenkins task is automatically created.
How do I implement this?
Write a python or bash script that listens on the gitlab api and creates a new jenkins task? Or is there an easier way?