{ "kind": "open-flow-workflow", "version": 1, "name": "Sync Pipedrive People to HubSpot", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_af0219436594b45e": { "name": "Every minute", "kind": "cron", "cronTimes": [ { "type": "cron", "expression": "* * * * *", "timezone": "UTC" } ] }, "n_09da63af4b462bd8": { "inputs": { "limit": { "kind": "value", "value": 500 }, "cursor": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_2e69a814637cdfd9", "output": "cursor" } ] } }, "name": "List Pipedrive people", "kind": "task", "task": { "inputs": [ { "description": "Filter ID to apply.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "Filter ID to apply." }, "nullable": true, "handle": "filterId", "value": null }, { "description": "Specific person IDs to fetch.", "jsonSchema": { "type": "array", "items": { "type": "integer", "exclusiveMinimum": 0, "description": "Pipedrive entity ID." }, "minItems": 1, "maxItems": 100, "description": "Specific person IDs to fetch." }, "nullable": true, "handle": "ids", "value": null }, { "description": "Owner user ID to filter by.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "Owner user ID to filter by." }, "nullable": true, "handle": "ownerId", "value": null }, { "description": "Organization ID to filter by.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "Organization ID to filter by." }, "nullable": true, "handle": "organizationId", "value": null }, { "description": "Deal ID to filter by.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "Deal ID to filter by." }, "nullable": true, "handle": "dealId", "value": null }, { "description": "Only include records updated at or after this RFC 3339 timestamp.", "jsonSchema": { "type": "string", "format": "date-time", "description": "Only include records updated at or after this RFC 3339 timestamp." }, "nullable": true, "handle": "updatedSince", "value": null }, { "description": "Only include records updated before this RFC 3339 timestamp.", "jsonSchema": { "type": "string", "format": "date-time", "description": "Only include records updated before this RFC 3339 timestamp." }, "nullable": true, "handle": "updatedUntil", "value": null }, { "description": "Person sort field accepted by Pipedrive.", "jsonSchema": { "type": "string", "enum": [ "id", "update_time", "add_time" ], "description": "Person sort field accepted by Pipedrive." }, "nullable": true, "handle": "sortBy", "value": null }, { "description": "Sort direction accepted by Pipedrive.", "jsonSchema": { "type": "string", "enum": [ "asc", "desc" ], "description": "Sort direction accepted by Pipedrive." }, "nullable": true, "handle": "sortDirection", "value": null }, { "description": "Additional person fields to include in the response.", "jsonSchema": { "type": "array", "items": { "type": "string", "enum": [ "next_activity_id", "last_activity_id", "open_deals_count", "related_open_deals_count", "closed_deals_count", "related_closed_deals_count", "participant_open_deals_count", "participant_closed_deals_count", "email_messages_count", "activities_count", "done_activities_count", "undone_activities_count", "files_count", "notes_count", "followers_count", "won_deals_count", "related_won_deals_count", "lost_deals_count", "related_lost_deals_count", "last_incoming_mail_time", "last_outgoing_mail_time", "marketing_status", "doi_status", "smart_bcc_email" ], "description": "Additional person field accepted by Pipedrive include_fields." }, "minItems": 1, "description": "Additional person fields to include in the response." }, "nullable": true, "handle": "includeFields", "value": null }, { "description": "Custom field keys to request from Pipedrive.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Pipedrive custom field key." }, "minItems": 1, "maxItems": 15, "description": "Custom field keys to request from Pipedrive." }, "nullable": true, "handle": "customFields", "value": null }, { "description": "Maximum number of items to return in one Pipedrive page.", "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 500, "description": "Maximum number of items to return in one Pipedrive page." }, "nullable": true, "handle": "limit", "value": null }, { "description": "Opaque pagination cursor returned by a previous Pipedrive response.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Opaque pagination cursor returned by a previous Pipedrive response." }, "nullable": true, "handle": "cursor", "value": null } ], "outputs": [ { "description": "Persons returned by Pipedrive.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "exclusiveMinimum": 0, "description": "Person ID." }, "name": { "type": "string", "description": "Person name." }, "first_name": { "type": [ "string", "null" ], "description": "Person first name." }, "last_name": { "type": [ "string", "null" ], "description": "Person last name." }, "owner_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Owner user ID." }, "org_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Linked organization ID." }, "add_time": { "type": "string", "description": "Creation timestamp." }, "update_time": { "type": "string", "description": "Last update timestamp." }, "emails": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1, "description": "Contact value such as an email address or phone number." }, "primary": { "type": "boolean", "description": "Whether this contact value is the primary one for the record." }, "label": { "type": [ "string", "null" ], "description": "User-facing label attached to the contact value." } }, "required": [ "value" ], "additionalProperties": false, "description": "Pipedrive contact value." }, "description": "Person email addresses." }, "phones": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1, "description": "Contact value such as an email address or phone number." }, "primary": { "type": "boolean", "description": "Whether this contact value is the primary one for the record." }, "label": { "type": [ "string", "null" ], "description": "User-facing label attached to the contact value." } }, "required": [ "value" ], "additionalProperties": false, "description": "Pipedrive contact value." }, "description": "Person phone numbers." }, "is_deleted": { "type": "boolean", "description": "Whether the person is deleted." }, "visible_to": { "type": "integer", "description": "Pipedrive visibility flag." }, "label_ids": { "type": "array", "items": { "type": "integer", "description": "Applied label ID." }, "description": "Applied label IDs." }, "picture_id": { "type": [ "integer", "null" ], "description": "Picture ID attached to the person." }, "postal_address": { "type": [ "object", "null" ], "properties": { "value": { "type": [ "string", "null" ], "description": "Full formatted address." }, "country": { "type": [ "string", "null" ], "description": "Country component." }, "admin_area_level_1": { "type": [ "string", "null" ], "description": "First administrative area component." }, "admin_area_level_2": { "type": [ "string", "null" ], "description": "Second administrative area component." }, "locality": { "type": [ "string", "null" ], "description": "City or locality component." }, "sublocality": { "type": [ "string", "null" ], "description": "Neighborhood or sublocality component." }, "route": { "type": [ "string", "null" ], "description": "Street or route component." }, "street_number": { "type": [ "string", "null" ], "description": "Street number component." }, "subpremise": { "type": [ "string", "null" ], "description": "Subpremise component such as suite or apartment." }, "postal_code": { "type": [ "string", "null" ], "description": "Postal code component." } }, "additionalProperties": true, "description": "Postal address returned by Pipedrive." }, "notes": { "type": [ "string", "null" ], "description": "Notes returned by contact sync when available." }, "im": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1, "description": "Contact value such as an email address or phone number." }, "primary": { "type": "boolean", "description": "Whether this contact value is the primary one for the record." }, "label": { "type": [ "string", "null" ], "description": "User-facing label attached to the contact value." } }, "required": [ "value" ], "additionalProperties": false, "description": "Pipedrive contact value." }, "description": "Instant messaging handles." }, "birthday": { "type": [ "string", "null" ], "description": "Birthday returned by contact sync." }, "job_title": { "type": [ "string", "null" ], "description": "Job title returned by contact sync." }, "marketing_status": { "type": [ "string", "null" ], "description": "Campaign marketing status when available." }, "custom_fields": { "type": [ "object", "null" ], "additionalProperties": { "description": "A record value." }, "description": "Custom fields returned by Pipedrive." } }, "required": [ "id", "name" ], "additionalProperties": true, "description": "Pipedrive person." }, "description": "Persons returned by Pipedrive." }, "nullable": false, "handle": "persons" }, { "description": "Cursor for the next page when Pipedrive has more results.", "jsonSchema": { "type": [ "string", "null" ], "description": "Cursor for the next page when Pipedrive has more results." }, "nullable": true, "handle": "nextCursor" } ], "name": "List Pipedrive people", "executor": { "kind": "connector", "action": "pipedrive.list_persons" } } }, "n_2e69a814637cdfd9": { "inputs": { "persons": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_09da63af4b462bd8", "output": "persons" } ] }, "nextCursor": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_09da63af4b462bd8", "output": "nextCursor" } ] }, "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_2e69a814637cdfd9", "output": "state" } ] } }, "name": "Collect people pages", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "exclusiveMinimum": 0, "description": "Person ID." }, "name": { "type": "string", "description": "Person name." }, "first_name": { "type": [ "string", "null" ], "description": "Person first name." }, "last_name": { "type": [ "string", "null" ], "description": "Person last name." }, "owner_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Owner user ID." }, "org_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Linked organization ID." }, "add_time": { "type": "string", "description": "Creation timestamp." }, "update_time": { "type": "string", "description": "Last update timestamp." }, "emails": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1, "description": "Contact value such as an email address or phone number." }, "primary": { "type": "boolean", "description": "Whether this contact value is the primary one for the record." }, "label": { "type": [ "string", "null" ], "description": "User-facing label attached to the contact value." } }, "required": [ "value" ], "additionalProperties": false, "description": "Pipedrive contact value." }, "description": "Person email addresses." }, "phones": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1, "description": "Contact value such as an email address or phone number." }, "primary": { "type": "boolean", "description": "Whether this contact value is the primary one for the record." }, "label": { "type": [ "string", "null" ], "description": "User-facing label attached to the contact value." } }, "required": [ "value" ], "additionalProperties": false, "description": "Pipedrive contact value." }, "description": "Person phone numbers." }, "is_deleted": { "type": "boolean", "description": "Whether the person is deleted." }, "visible_to": { "type": "integer", "description": "Pipedrive visibility flag." }, "label_ids": { "type": "array", "items": { "type": "integer", "description": "Applied label ID." }, "description": "Applied label IDs." }, "picture_id": { "type": [ "integer", "null" ], "description": "Picture ID attached to the person." }, "postal_address": { "type": [ "object", "null" ], "properties": { "value": { "type": [ "string", "null" ], "description": "Full formatted address." }, "country": { "type": [ "string", "null" ], "description": "Country component." }, "admin_area_level_1": { "type": [ "string", "null" ], "description": "First administrative area component." }, "admin_area_level_2": { "type": [ "string", "null" ], "description": "Second administrative area component." }, "locality": { "type": [ "string", "null" ], "description": "City or locality component." }, "sublocality": { "type": [ "string", "null" ], "description": "Neighborhood or sublocality component." }, "route": { "type": [ "string", "null" ], "description": "Street or route component." }, "street_number": { "type": [ "string", "null" ], "description": "Street number component." }, "subpremise": { "type": [ "string", "null" ], "description": "Subpremise component such as suite or apartment." }, "postal_code": { "type": [ "string", "null" ], "description": "Postal code component." } }, "additionalProperties": true, "description": "Postal address returned by Pipedrive." }, "notes": { "type": [ "string", "null" ], "description": "Notes returned by contact sync when available." }, "im": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1, "description": "Contact value such as an email address or phone number." }, "primary": { "type": "boolean", "description": "Whether this contact value is the primary one for the record." }, "label": { "type": [ "string", "null" ], "description": "User-facing label attached to the contact value." } }, "required": [ "value" ], "additionalProperties": false, "description": "Pipedrive contact value." }, "description": "Instant messaging handles." }, "birthday": { "type": [ "string", "null" ], "description": "Birthday returned by contact sync." }, "job_title": { "type": [ "string", "null" ], "description": "Job title returned by contact sync." }, "marketing_status": { "type": [ "string", "null" ], "description": "Campaign marketing status when available." }, "custom_fields": { "type": [ "object", "null" ], "additionalProperties": { "description": "A record value." }, "description": "Custom fields returned by Pipedrive." } }, "required": [ "id", "name" ], "additionalProperties": true, "description": "Pipedrive person." }, "description": "Persons returned by Pipedrive." }, "nullable": false, "handle": "persons" }, { "jsonSchema": { "type": [ "string", "null" ], "description": "Cursor for the next page when Pipedrive has more results." }, "nullable": true, "handle": "nextCursor" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "cursor" } ], "name": "Collect people pages", "moduleId": "n_6a0618a88af8ef48", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_09600c9272557bcb": { "inputs": {}, "name": "More people?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_2e69a814637cdfd9", "output": "more" } }, "operator": "isTrue" } ] } ] } ] }, "n_dc4a15833dbe7bf2": { "inputs": { "properties": { "kind": "value", "value": [ "email" ] }, "limit": { "kind": "value", "value": 200 }, "after": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_10a21fc39bfb81b9", "output": "cursor" } ] } }, "name": "List HubSpot contacts", "kind": "task", "task": { "inputs": [ { "description": "Full-text query applied to the HubSpot CRM search.", "jsonSchema": { "type": "string", "description": "Full-text query applied to the HubSpot CRM search." }, "nullable": true, "handle": "query", "value": null }, { "description": "HubSpot filter groups used to narrow the search.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "HubSpot CRM search filter group." }, "maxItems": 5, "description": "HubSpot filter groups used to narrow the search." }, "nullable": true, "handle": "filterGroups", "value": null }, { "description": "HubSpot sort expressions.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "HubSpot sort expression." }, "description": "HubSpot sort expressions." }, "nullable": true, "handle": "sorts", "value": null }, { "description": "Property names to include in the returned record payload.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "HubSpot property name." }, "description": "Property names to include in the returned record payload." }, "nullable": true, "handle": "properties", "value": null }, { "description": "Property names to include with their value history.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "HubSpot property name." }, "description": "Property names to include with their value history." }, "nullable": true, "handle": "propertiesWithHistory", "value": null }, { "description": "Associated object types to include in the response.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "HubSpot associated object type." }, "description": "Associated object types to include in the response." }, "nullable": true, "handle": "associations", "value": null }, { "description": "Maximum number of records to return.", "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 200, "description": "Maximum number of records to return." }, "nullable": true, "handle": "limit", "value": null }, { "description": "Paging cursor returned by a previous search request.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Paging cursor returned by a previous search request." }, "nullable": true, "handle": "after", "value": null } ], "outputs": [ { "description": "Records returned by the search request.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "HubSpot record identifier." }, "archived": { "type": "boolean", "description": "Whether the record is archived." }, "createdAt": { "type": "string", "description": "Timestamp when the record was created." }, "updatedAt": { "type": "string", "description": "Timestamp when the record was last updated." }, "properties": { "type": "object", "additionalProperties": { "description": "Property value." }, "description": "HubSpot properties keyed by property name." }, "propertiesWithHistory": { "type": "object", "additionalProperties": { "description": "Property history payload." }, "description": "HubSpot property histories keyed by property name." }, "associations": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Associations returned by HubSpot when requested." } }, "additionalProperties": true, "description": "HubSpot CRM record returned by the MCP server." }, "description": "Records returned by the search request." }, "nullable": false, "handle": "results" }, { "description": "Paging information returned by HubSpot.", "jsonSchema": { "type": "object", "properties": { "nextAfter": { "type": "string", "description": "Cursor for the next search request when another page is available." } }, "additionalProperties": true, "description": "Paging information returned by HubSpot." }, "nullable": true, "handle": "paging" }, { "description": "Raw MCP response payload.", "jsonSchema": { "description": "Raw MCP response payload." }, "nullable": true, "handle": "raw" } ], "name": "List HubSpot contacts", "executor": { "kind": "connector", "action": "hubspot.search_contacts" } } }, "n_10a21fc39bfb81b9": { "inputs": { "results": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_dc4a15833dbe7bf2", "output": "results" } ] }, "paging": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_dc4a15833dbe7bf2", "output": "paging" } ] }, "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_10a21fc39bfb81b9", "output": "state" } ] } }, "name": "Collect contact pages", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "HubSpot record identifier." }, "archived": { "type": "boolean", "description": "Whether the record is archived." }, "createdAt": { "type": "string", "description": "Timestamp when the record was created." }, "updatedAt": { "type": "string", "description": "Timestamp when the record was last updated." }, "properties": { "type": "object", "additionalProperties": { "description": "Property value." }, "description": "HubSpot properties keyed by property name." }, "propertiesWithHistory": { "type": "object", "additionalProperties": { "description": "Property history payload." }, "description": "HubSpot property histories keyed by property name." }, "associations": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Associations returned by HubSpot when requested." } }, "additionalProperties": true, "description": "HubSpot CRM record returned by the MCP server." }, "description": "Records returned by the search request." }, "nullable": false, "handle": "results" }, { "jsonSchema": { "type": "object", "properties": { "nextAfter": { "type": "string", "description": "Cursor for the next search request when another page is available." } }, "additionalProperties": true, "description": "Paging information returned by HubSpot." }, "nullable": true, "handle": "paging" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "cursor" } ], "name": "Collect contact pages", "moduleId": "n_6dec2dadd0137dd1", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_c5cb0f8cffb0cdd9": { "inputs": {}, "name": "More contacts?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_10a21fc39bfb81b9", "output": "more" } }, "operator": "isTrue" } ] } ] } ] }, "n_34c71741461fe6e5": { "inputs": { "people": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_2e69a814637cdfd9", "output": "state" } ] }, "contacts": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_10a21fc39bfb81b9", "output": "state" } ] } }, "name": "Match and validate emails", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "people" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "contacts" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "contacts" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasContacts" } ], "name": "Match and validate emails", "moduleId": "n_c0d882d1b2b381d4", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_996e1e3c5c46bfc4": { "inputs": { "contacts": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_34c71741461fe6e5", "output": "contacts" } ] }, "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_996e1e3c5c46bfc4", "output": "state" } ] } }, "name": "Prepare next contact", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "contacts" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "object", "additionalProperties": { "description": "HubSpot property value." }, "description": "HubSpot properties keyed by property name." }, "nullable": false, "handle": "properties" } ], "name": "Prepare next contact", "moduleId": "n_31cd2782a969b7a3", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_0e542d80ec75a9ef": { "inputs": {}, "name": "More to create?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_996e1e3c5c46bfc4", "output": "more" } }, "operator": "isTrue" } ] } ] } ] }, "n_b9a4f976c38db243": { "inputs": { "properties": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_996e1e3c5c46bfc4", "output": "properties" } ] } }, "name": "Create HubSpot contact", "kind": "task", "task": { "inputs": [ { "description": "HubSpot properties keyed by property name.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "HubSpot property value." }, "description": "HubSpot properties keyed by property name." }, "nullable": false, "handle": "properties" }, { "description": "Association definitions to create alongside the record.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "HubSpot object payload." }, "description": "Association definitions to create alongside the record." }, "nullable": true, "handle": "associations", "value": null } ], "outputs": [ { "description": "HubSpot CRM record returned by the MCP server.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "HubSpot record identifier." }, "archived": { "type": "boolean", "description": "Whether the record is archived." }, "createdAt": { "type": "string", "description": "Timestamp when the record was created." }, "updatedAt": { "type": "string", "description": "Timestamp when the record was last updated." }, "properties": { "type": "object", "additionalProperties": { "description": "Property value." }, "description": "HubSpot properties keyed by property name." }, "propertiesWithHistory": { "type": "object", "additionalProperties": { "description": "Property history payload." }, "description": "HubSpot property histories keyed by property name." }, "associations": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Associations returned by HubSpot when requested." } }, "additionalProperties": true, "description": "HubSpot CRM record returned by the MCP server." }, "nullable": false, "handle": "record" } ], "name": "Create HubSpot contact", "executor": { "kind": "connector", "action": "hubspot.create_contact" } } } }, "edges": [ { "source": "n_af0219436594b45e", "target": "n_09da63af4b462bd8" }, { "source": "n_09da63af4b462bd8", "target": "n_2e69a814637cdfd9" }, { "source": "n_2e69a814637cdfd9", "target": "n_09600c9272557bcb" }, { "source": "n_09600c9272557bcb", "target": "n_09da63af4b462bd8", "sourceHandle": "yes" }, { "source": "n_09600c9272557bcb", "target": "n_dc4a15833dbe7bf2", "sourceHandle": "otherwise" }, { "source": "n_dc4a15833dbe7bf2", "target": "n_10a21fc39bfb81b9" }, { "source": "n_10a21fc39bfb81b9", "target": "n_c5cb0f8cffb0cdd9" }, { "source": "n_c5cb0f8cffb0cdd9", "target": "n_dc4a15833dbe7bf2", "sourceHandle": "yes" }, { "source": "n_c5cb0f8cffb0cdd9", "target": "n_34c71741461fe6e5", "sourceHandle": "otherwise" }, { "source": "n_34c71741461fe6e5", "target": "n_996e1e3c5c46bfc4" }, { "source": "n_996e1e3c5c46bfc4", "target": "n_0e542d80ec75a9ef" }, { "source": "n_0e542d80ec75a9ef", "target": "n_b9a4f976c38db243", "sourceHandle": "yes" }, { "source": "n_b9a4f976c38db243", "target": "n_996e1e3c5c46bfc4" } ] } }, "modules": { "n_6a0618a88af8ef48": { "name": "Collect people pages", "imports": [], "source": "export default function collectPeople({persons,nextCursor,previousState}) {\n const state=previousState??{records:[],seen:[]};if(!Array.isArray(persons)||!Array.isArray(state.records)||!Array.isArray(state.seen))throw Error('Invalid Pipedrive page');\n const cursor=nextCursor??null;if(cursor!==null&&(typeof cursor!=='string'||!cursor||state.seen.includes(cursor)))throw Error('Invalid or repeated Pipedrive cursor');\n return {state:{records:[...state.records,...persons],seen:cursor?[...state.seen,cursor]:state.seen},more:cursor!==null,cursor:cursor??'unused'};\n}\n" }, "n_6dec2dadd0137dd1": { "name": "Collect contact pages", "imports": [], "source": "export default function collectContacts({results,paging,previousState}) {\n const state=previousState??{records:[],seen:[]};if(!Array.isArray(results)||!Array.isArray(state.records)||!Array.isArray(state.seen))throw Error('Invalid HubSpot page');const cursor=paging?.nextAfter??null;if(cursor!==null&&(typeof cursor!=='string'||!cursor||state.seen.includes(cursor)))throw Error('Invalid or repeated HubSpot cursor');const records=[...state.records,...results];if(records.length>=10000)throw Error('HubSpot search limit reached; no contacts created');return{state:{records,seen:cursor?[...state.seen,cursor]:state.seen},more:cursor!==null,cursor:cursor??'unused'};\n}\n" }, "n_c0d882d1b2b381d4": { "name": "Match and validate emails", "imports": [], "source": "export default function planContacts({people,contacts}) {\n if(!Array.isArray(people?.records)||!Array.isArray(contacts?.records))throw Error('Invalid contact lists');const present=new Set();for(const c of contacts.records){const email=c?.properties?.email;if(email!=null&&typeof email!=='string')throw Error('Invalid HubSpot email');if(email)present.add(email.toLowerCase());}const proposed=[];for(const p of people.records){const email=p?.emails?.[0]?.value;if(typeof email!=='string'||!email.trim()||email!==email.trim())throw Error('Pipedrive person has no usable first email');if(p.first_name!=null&&typeof p.first_name!=='string')throw Error('Invalid Pipedrive first name');const key=email.toLowerCase();if(!present.has(key)){proposed.push({email,...(p.first_name?{firstname:p.first_name}:{})});present.add(key);}}return{contacts:proposed,hasContacts:proposed.length>0};\n}\n" }, "n_31cd2782a969b7a3": { "name": "Prepare next contact", "imports": [], "source": "export default function nextContact({contacts,previousState}) {if(!Array.isArray(contacts))throw Error('Invalid create list');const index=previousState?.index??0;if(!Number.isInteger(index)||index<0||index>contacts.length)throw Error('Invalid position');return {state:{index:index+1},more:index