Start Gitlab runner pipeline

Hi,
I have tried to do start a Gitlab pipeline from a n8n workflow, but no luck so, I have tried to use Function and HTTP request.
To start a pipeline with curl, I do this:

curl -X POST \
     --fail \
     -F token=mytoken \
     -F ref=mybranch \
     https://gitlab.foo.bar/api/v4/projects/34/trigger/pipeline

And that works fine. So I I need some guidance to make this work from n8n.

So soon after I posted this, I got this sorted…

Using Form-Data multipart, and set the required body parameters.

2 Likes