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 these NEW OPEN IN_PROGRESS OPEN_DEAL UNQUALIFIED ATTEMPTED_TO_CONTACT CONNECTED BAD_TIMING Default is NEW |
lifeCycleStage |
String | Optional field. Must be one of these subscriber lead marketingqualifiedlead salesqualifiedlead opportunity customer other Default is empty |
overwriteContact |
Boolean | Optional field. Allow to overwrite contact information if 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 |
---|---|
_replyto |
Type is email |
email |
Type is email |
email or _replyto |
Required |