{ "name": "Pipedrive Deal Creator", "nodes": [ { "name": "On clicking 'execute'", "type": "n8n-nodes-base.manualTrigger", "position": [ 250, 300 ], "parameters": {}, "typeVersion": 1, "id": "pipedrive-deal-creator-0" }, { "name": "Create Pipedrive deal", "type": "n8n-nodes-base.httpRequest", "position": [ 450, 300 ], "parameters": { "method": "POST", "url": "https://api.pipedrive.com/api/v2/deals", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "contentType": "json", "specifyBody": "json", "jsonBody": "{\"title\":\"YOUR_DEAL_TITLE\"}", "options": { "timeout": 30000, "redirect": { "redirect": { "followRedirects": false } }, "response": { "response": { "responseFormat": "json", "fullResponse": false, "neverError": false } } } }, "typeVersion": 4.2, "id": "pipedrive-deal-creator-1" }, { "id": "pipedrive-deal-creator-result", "name": "Return created deal", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 760, 300 ], "parameters": { "mode": "runOnceForEachItem", "jsCode": "if($json.success!==true||!$json.data||!Number.isInteger($json.data.id)||$json.data.id<=0||typeof $json.data.title!==\"string\")throw new Error(\"Pipedrive did not confirm deal creation\");\nreturn {json:$json.data};" } } ], "active": false, "settings": { "executionOrder": "v1" }, "connections": { "On clicking 'execute'": { "main": [ [ { "node": "Create Pipedrive deal", "type": "main", "index": 0 } ] ] }, "Create Pipedrive deal": { "main": [ [ { "node": "Return created deal", "type": "main", "index": 0 } ] ] } }, "pinData": {} }