Specifying Pipeline when creating a deal

Hi. New to Pipedrive integration, using a plugin to integrate a gravity form to Pipedrive account. I have multiple pipelines and the form integration works OK when I am integrating to the first (default) pipeline, but I need to integrate a form to a different pipeline to create a deal and it doesn’t like what I am sending to the Pipeline field when creating a deal. Receiving the error message below.

I am passing the Pipeline name as text exactly how it is setup in Pipedrive. Also, tried what I believe to be the pipeline ID (number) instead of the name itself, but it still errors. In looking at Log, looks like it actually converted the ID back to the name in what is getting passed.

Error Message:
The entry was not added to Pipedrive because: Error while creating deal (Invalid field(s) in the payload: pipeline) .

I’m not a hard core developer so not sure how to troubleshoot and provide what Pipedrive wants to specify which Pipeline to create the deal under.


Hi @jmccrone

In order to create a deal in a specific pipeline, you need to pass stage_id in a request body (details here)

ID of the stage this deal will be placed in a pipeline (note that you can’t supply the ID of the pipeline as this will be assigned automatically based on stage_id ). If omitted, the deal will be placed in the first stage of the default pipeline.

First, find a pipeline you need and take its ID. GET /pipelines (Pipedrive API v1 Reference)

After that, call GET /stages?pipeline_id=<pipelineIdYouNeed> (Pipedrive API v1 Reference) and get stage ID form the response (I assume first one)

Finally, you can call POST /deals

    "title": "my deal",
    "stage_id": "stage id of a pipeline where deal should be added"