Adding the hubspot action in the formspree.json
file has the same effect as adding the Hubspot plugin in the Formspree dashboard. See the Hubspot plugin help article to know about leadStatus, lifeCycleStage and for more information.
Get your API Token
First go to your Hubspot account and get or create your API Key.
This is availble in Profile & Preferences->Integrations->API Key. Click in Create Key button and create your key. Copy it, it will be needed in formspree.json configuration.
Formspree.json configuration
Key | Type | Description |
---|---|---|
app |
String | Must be hubspot |
type |
String | Must be createContact |
apiKey |
String | Your API key (must be a $env variable reference, required) |
leadStatus |
String | Optional field. Must be one of NEW , OPEN , IN_PROGRESS , OPEN_DEAL , UNQUALIFIED , ATTEMPTED_TO_CONTACT , CONNECTED , or BAD_TIMING . Default is NEW . |
lifeCycleStage |
String | Optional field. Must be one of subscriber , lead , marketingqualifiedlead , salesqualifiedlead , opportunity , customer , or other . Default is empty. |
overwriteContact |
Boolean | Optional field. If true, overwrite contact information if the contact email already exists in Hubspot. Default is false |
Example
{
"forms": {
"registrationForm": {
"name": "Registration Form",
"actions": [
{
"app": "hubspot",
"type": "createContact",
"apiKey": "$apiKey",
"leadStatus": "NEW",
"lifeCycleStage": "lead",
"overwriteContact": true
}
]
}
}
}
Validation rules
The create support ticket action adds the following validation rules implicitly:
Field | Validation Rule |
---|---|
email |
Required |
email |
Type is email |