Put the parsley and coriander leaves, oregano and peeled garlic and shallots, deseeded red pepper, vinegar, lemon juice and olive oil into a blender. Reduce to a smooth purée. Set aside.
Wash and peel the sweet potatoes. Slice finely. Mix with the chimichurri sauce, olive oil, lemon juice, maple syrup, tomato purée, salt and pepper. Arrange the sweet potato slices in the pot in a rosette.
Preheat the oven to 220°C.
Place the cubes of butter all over the gratin. Bake in the oven with the lid on for 1 hour 40 minutes.
Mix the parsley and pine nuts and sprinkle this mixture over the gratin just before serving.