create_form
Create a live HubSpot form with custom fields, submit button, and success message. Use it to add a submittable form to your page after review.
Instructions
Create a HubSpot form.
NOT a draft. HubSpot's v3 Forms API has no draft state, so this form is live and submittable the moment it is created. What keeps it inert is that it is not embedded anywhere — you place it on a page yourself once you have reviewed it. Say this to the user when you create one.
Args: name: form name shown in the HubSpot listing. fields: list of simplified field specs, in display order. Each entry: { "name": "firstname", # required: contact property internal name "label": "First name", "type": "single_line_text", # see below "required": true, "hidden": false, "options": ["A", "B"], # required for dropdown/radio/checkbox "placeholder": "...", "description": "..." } Types: single_line_text, multi_line_text, email, phone, number, dropdown, radio, checkbox, single_checkbox, date, file. submit_button_text: label on the submit button. success_message: message shown after a successful submission. language: ISO 639-1 code. Default 'en'.
Note on consent: GDPR consent options are not set here, because they need a lawful basis and subscription type IDs that vary per portal. Configure consent in the HubSpot form editor after creation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| fields | Yes | ||
| language | No | en | |
| success_message | No | Thanks — we'll be in touch. | |
| submit_button_text | No | Submit |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||