> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.hubspot.crm.CreateDeal

- Component: `appmixer.hubspot.crm.CreateDeal`
- Kind: Action
- Version: 1.0.4
- Visibility: Public
- Connector: [appmixer.hubspot 4.10.0](https://connectors.appmixer.com/connector/appmixer.hubspot/4.10.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.hubspot/4.10.0/component/appmixer.hubspot.crm.CreateDeal>

Create a new deal.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Deal Name (`dealname`) | text | Deal Name. |
| Pipeline (`pipeline`) | text | If the pipeline property is not specified, the default pipeline is assumed. However, it is recommended to always specify the pipeline, especially on accounts with multiple pipelines. |
| Deal Stage (`dealstage`) | text | Deal Stage. |
| Owner (`hubSpotOwnerId`) | text | Select an owner. |
| Close Date (`closedate`) | date-time | Close Date. |
| Amount (`amount`) | text | Amount. |
| Additional Properties (`additionalProperties`) | expression | Addition HubSpot or custom properties to add to the deal. |

## Output ports

### Port `newDeal`

Variables are loaded dynamically from `/component/appmixer/hubspot/crm/GetDealsProperties?outPort=out`.

## Full metadata (component.json)

```json
{
  "name": "appmixer.hubspot.crm.CreateDeal",
  "author": "Appmixer <info@appmixer.com>",
  "icon": "(data URI omitted)",
  "description": "Create a new deal.",
  "version": "1.0.4",
  "dependencies": {
    "service": "1.0.1"
  },
  "private": false,
  "auth": {
    "service": "appmixer:hubspot"
  },
  "quota": {
    "manager": "appmixer:hubspot",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "dealname": {
            "type": "string"
          },
          "dealstage": {
            "type": "string"
          },
          "pipeline": {
            "type": "string"
          },
          "hubSpotOwnerId": {
            "type": "string"
          },
          "closedate": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object"
          }
        },
        "required": [
          "dealname"
        ]
      },
      "inspector": {
        "inputs": {
          "dealname": {
            "type": "text",
            "label": "Deal Name",
            "tooltip": "Deal Name.",
            "index": 1
          },
          "pipeline": {
            "type": "text",
            "label": "Pipeline",
            "tooltip": "If the pipeline property is not specified, the default pipeline is assumed. However, it is recommended to always specify the pipeline, especially on accounts with multiple pipelines.",
            "source": {
              "url": "/component/appmixer/hubspot/crm/ListPipelines?outPort=out",
              "data": {
                "messages": {
                  "in/objectType": "deals"
                },
                "transform": "./ListPipelines#toSelectArray"
              }
            },
            "index": 2
          },
          "dealstage": {
            "type": "text",
            "label": "Deal Stage",
            "tooltip": "Deal Stage.",
            "index": 3,
            "source": {
              "url": "/component/appmixer/hubspot/crm/ListPipelineStages?outPort=out",
              "data": {
                "messages": {
                  "in/pipelineId": "inputs/in/pipeline",
                  "in/isSource": true
                },
                "transform": "./ListPipelineStages#toSelectArray"
              }
            }
          },
          "hubSpotOwnerId": {
            "type": "text",
            "label": "Owner",
            "index": 4,
            "source": {
              "url": "/component/appmixer/hubspot/crm/ListOwners?outPort=owners",
              "data": {
                "transform": "./ListOwners#ownersToSelectArray"
              }
            },
            "tooltip": "Select an owner."
          },
          "closedate": {
            "type": "date-time",
            "label": "Close Date",
            "tooltip": "Close Date.",
            "index": 5
          },
          "amount": {
            "type": "text",
            "label": "Amount",
            "tooltip": "Amount.",
            "index": 6
          },
          "additionalProperties": {
            "type": "expression",
            "label": "Additional Properties",
            "tooltip": "Addition HubSpot or custom properties to add to the deal.",
            "exclusiveFields": [
              "name"
            ],
            "index": 7,
            "levels": [
              "AND"
            ],
            "fields": {
              "name": {
                "type": "select",
                "label": "Property",
                "tooltip": "The property to add to the deal.",
                "index": 1,
                "source": {
                  "url": "/component/appmixer/hubspot/crm/GetDealsProperties?outPort=out",
                  "data": {
                    "transform": "./GetDealsProperties#additionalFieldsToSelectArray"
                  }
                }
              },
              "value": {
                "type": "text",
                "label": "Value",
                "tooltip": "The value for the property.",
                "index": 2
              }
            }
          }
        },
        "groups": {
          "associations": {
            "label": "Associations",
            "index": 1
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "newDeal",
      "source": {
        "url": "/component/appmixer/hubspot/crm/GetDealsProperties?outPort=out",
        "data": {
          "transform": "./GetDealsProperties#dealToSelectArray",
          "messages": {
            "in/dealname": "dummy"
          }
        }
      }
    }
  ]
}
```
