{ "kind": "open-flow-workflow", "version": 1, "name": "Pipedrive Deal Creator", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_26a9b848479944ff": { "name": "Start deal creation", "kind": "start", "inputDefs": [] }, "n_354735433e7f80c3": { "inputs": { "title": { "kind": "value", "value": "YOUR_DEAL_TITLE" } }, "name": "Create Pipedrive deal", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string", "minLength": 1, "description": "Deal title." }, "nullable": false, "handle": "title" } ], "outputs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "integer", "exclusiveMinimum": 0, "description": "Deal ID." }, "title": { "type": "string", "description": "Deal title." }, "owner_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Owner user ID." }, "person_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Linked person ID." }, "org_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Linked organization ID." }, "pipeline_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Pipeline ID." }, "stage_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Stage ID." }, "value": { "type": [ "number", "null" ], "description": "Deal monetary value." }, "currency": { "type": [ "string", "null" ], "description": "Deal currency." }, "add_time": { "type": "string", "description": "Creation timestamp." }, "update_time": { "type": "string", "description": "Last update timestamp." }, "stage_change_time": { "type": [ "string", "null" ], "description": "Last stage change timestamp." }, "is_deleted": { "type": "boolean", "description": "Whether the deal is deleted." }, "is_archived": { "type": "boolean", "description": "Whether the deal is archived." }, "status": { "type": [ "string", "null" ], "description": "Deal status." }, "probability": { "type": [ "number", "null" ], "description": "Winning probability percentage." }, "lost_reason": { "type": [ "string", "null" ], "description": "Reason for a lost deal." }, "visible_to": { "type": "integer", "description": "Pipedrive visibility flag." }, "close_time": { "type": [ "string", "null" ], "description": "Close timestamp." }, "won_time": { "type": [ "string", "null" ], "description": "Won timestamp." }, "lost_time": { "type": [ "string", "null" ], "description": "Lost timestamp." }, "expected_close_date": { "type": [ "string", "null" ], "description": "Expected close date." }, "label_ids": { "type": "array", "items": { "type": "integer", "description": "Applied label ID." }, "description": "Applied label IDs." }, "source_lead_id": { "type": [ "string", "null" ], "description": "Source lead UUID when available." }, "custom_fields": { "type": [ "object", "null" ], "additionalProperties": { "description": "A record value." }, "description": "Custom fields returned by Pipedrive." } }, "required": [ "id", "title" ], "additionalProperties": true, "description": "Returned deal record." }, "nullable": false, "handle": "deal" } ], "name": "Create Pipedrive deal", "moduleId": "n_0b812fe2c60bb547", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [ { "action": "pipedrive.create_deal" } ] } ] } }, "n_a875f1dde1f75885": { "name": "Created deal", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "integer", "exclusiveMinimum": 0, "description": "Deal ID." }, "title": { "type": "string", "description": "Deal title." }, "owner_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Owner user ID." }, "person_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Linked person ID." }, "org_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Linked organization ID." }, "pipeline_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Pipeline ID." }, "stage_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Stage ID." }, "value": { "type": [ "number", "null" ], "description": "Deal monetary value." }, "currency": { "type": [ "string", "null" ], "description": "Deal currency." }, "add_time": { "type": "string", "description": "Creation timestamp." }, "update_time": { "type": "string", "description": "Last update timestamp." }, "stage_change_time": { "type": [ "string", "null" ], "description": "Last stage change timestamp." }, "is_deleted": { "type": "boolean", "description": "Whether the deal is deleted." }, "is_archived": { "type": "boolean", "description": "Whether the deal is archived." }, "status": { "type": [ "string", "null" ], "description": "Deal status." }, "probability": { "type": [ "number", "null" ], "description": "Winning probability percentage." }, "lost_reason": { "type": [ "string", "null" ], "description": "Reason for a lost deal." }, "visible_to": { "type": "integer", "description": "Pipedrive visibility flag." }, "close_time": { "type": [ "string", "null" ], "description": "Close timestamp." }, "won_time": { "type": [ "string", "null" ], "description": "Won timestamp." }, "lost_time": { "type": [ "string", "null" ], "description": "Lost timestamp." }, "expected_close_date": { "type": [ "string", "null" ], "description": "Expected close date." }, "label_ids": { "type": "array", "items": { "type": "integer", "description": "Applied label ID." }, "description": "Applied label IDs." }, "source_lead_id": { "type": [ "string", "null" ], "description": "Source lead UUID when available." }, "custom_fields": { "type": [ "object", "null" ], "additionalProperties": { "description": "A record value." }, "description": "Custom fields returned by Pipedrive." } }, "required": [ "id", "title" ], "additionalProperties": true, "description": "Returned deal record." }, "nullable": false, "handle": "deal" } ], "outputMappings": { "deal": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_354735433e7f80c3", "output": "deal" } ] } } } }, "edges": [ { "source": "n_26a9b848479944ff", "target": "n_354735433e7f80c3" }, { "source": "n_354735433e7f80c3", "target": "n_a875f1dde1f75885" } ] } }, "modules": { "n_0b812fe2c60bb547": { "name": "Create Pipedrive deal", "imports": [], "source": "export default async function createDeal({ title }, context) {\n const response = await context.actions.call('pipedrive.create_deal', { title });\n return { deal: response.deal };\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }