Deftform

App · Forms & Surveys · 11 actions

Work with your Deftform forms from a workflow: read the forms in your workspace and the questions on them, pull submissions with their answers keyed by question, get a PDF of any one of them, record new responses from another system, and open, close or reconfigure a form as the workflow goes.

Actions

ActionWhat it does
Close a formStop a form accepting responses, and optionally set the message people see instead.
Get a formRead one form and all of its fields, including the ID of each field.
Get a responseRead one submission and its answers.
Get a response as a PDFAsk Deftform for a PDF summary of one submission and get back a link to it.
Get workspace detailsRead the connected Deftform workspace: its name, its owner, how many members it has, its time zone and the defaults new forms inherit.
List form fieldsRead the questions on a form: each one's label, its type, whether it's required, and the ID a submitted answer is filed under.
List formsRead every form in your Deftform workspace: its name, its ID and how many fields it has.
List responsesRead a form's submissions, newest first.
Reopen a formLet a closed form accept responses again.
Submit a responseRecord a response against one of your forms, as though somebody had filled it in, useful for feeding a form from another system.
Update form settingsChange a form's name, description, button label, thank-you message, redirect, response cap, CAPTCHA or search-engine listing.

Close a form

Stop a form accepting responses, and optionally set the message people see instead. Use it to close registration on a deadline, or once a place limit is reached.

Inputs

Form to closeform_idtextRequired
Which of your Deftform forms this step works on.
Message while closedclosed_messagetext
What visitors see in place of the form. Leave blank to keep the message it already has.

Outputs

form_idtext
is_closedtrue/false
nametext
settings_changedlist
updated_attext
Example output
{
  "form_id": "OUm6T9",
  "is_closed": true,
  "name": "Contact us",
  "settings_changed": [
    "is_closed"
  ],
  "updated_at": "2026-09-17T09:14:22.000000Z"
}

Get a form

Read one form and all of its fields, including the ID of each field. Use it before a 'Submit a response' step, or to check what a form is asking for.

Inputs

Form to readform_idtextRequired
Which of your Deftform forms this step works on.

Outputs

after_messagetext
after_redirect_delaynumber
after_redirect_urltext
captchatext
capture_locationtrue/false
closed_attext
closed_messagetext
created_attext
cta_labeltext
descriptiontext
discord_enabledtrue/false
field_countnumber
fieldslist
google_sheets_enabledtrue/false
hubspot_enabledtrue/false
idtext
is_closedtrue/false
nametext
seo_allow_botstrue/false
seo_descriptiontext
seo_titletext
show_formtitletrue/false
slack_enabledtrue/false
slugtext
updated_attext
Example output
{
  "after_message": "<p>Thank you, we'll be in touch.</p>",
  "after_redirect_delay": null,
  "after_redirect_url": null,
  "captcha": null,
  "capture_location": false,
  "closed_at": null,
  "closed_message": null,
  "created_at": "2026-09-17T21:24:25.000000Z",
  "cta_label": null,
  "description": null,
  "discord_enabled": false,
  "field_count": 2,
  "fields": [
    {
      "custom_key": "email_address",
      "label": "Email address",
      "options": null,
      "placeholder": "you@example.com",
      "required": true,
      "type": "email",
      "uuid": "f5fb1e1a-0a70-486b-90d9-67146b125a33"
    }
  ],
  "google_sheets_enabled": false,
  "hubspot_enabled": false,
  "id": "OUm6T9",
  "is_closed": false,
  "name": "Contact us",
  "seo_allow_bots": false,
  "seo_description": null,
  "seo_title": null,
  "show_formtitle": true,
  "slack_enabled": false,
  "slug": "contact-us-OUm6T9",
  "updated_at": "2026-09-17T21:24:25.000000Z"
}

Get a response

Read one submission and its answers. If it's been deleted the step says so and carries on, rather than failing the workflow.

Inputs

Formform_idtextRequired
Which of your Deftform forms this step works on.
Responseresponse_idtextRequired
The submission's ID: the 'id' from a 'List responses' step, or the one a webhook sent you.

Outputs

foundtrue/false
responseobject
Example output
{
  "found": true,
  "response": {
    "answers": {
      "Email address": "ada@example.com",
      "Name": "Ada Lovelace"
    },
    "created_at": "2026-09-17T21:26:11.000000Z",
    "fields": [
      {
        "label": "Name",
        "response": "Ada Lovelace"
      },
      {
        "label": "Email address",
        "response": "ada@example.com"
      }
    ],
    "id": "b8384cd3-532b-416e-b450-94a7d715e3bb",
    "is_incomplete": false,
    "number": 9,
    "number_formatted": "9",
    "referrer": null
  }
}

Get a response as a PDF

Ask Deftform for a PDF summary of one submission and get back a link to it. The link expires a few minutes after it's made, so download or forward it in the same run.

Inputs

Responseresponse_idtextRequired
The submission's ID: the 'id' from a 'List responses' step, or the one a webhook sent you.

Outputs

expires_in_secondsnumber
response_idtext
urltext
Example output
{
  "expires_in_seconds": 300,
  "response_id": "b8384cd3-532b-416e-b450-94a7d715e3bb",
  "url": "https://returnpdf.example.r2.cloudflarestorage.com/1789680388_document.pdf?X-Amz-Expires=300&X-Amz-Signature=..."
}

Get workspace details

Read the connected Deftform workspace: its name, its owner, how many members it has, its time zone and the defaults new forms inherit.

Inputs

None.

Outputs

after_messagetext
after_redirect_urltext
created_attext
discord_connectedtrue/false
field_error_messagetext
localetext
max_upload_size_mbnumber
member_countnumber
nametext
ownerobject
reply_to_emailtext
slack_connectedtrue/false
timezonetext
Example output
{
  "after_message": "<p>Thank you, we'll be in touch.</p>",
  "after_redirect_url": null,
  "created_at": "2026-08-20T08:24:20.000000Z",
  "discord_connected": false,
  "field_error_message": "This field is mandatory.",
  "locale": "en",
  "max_upload_size_mb": 50,
  "member_count": 0,
  "name": "Acme Forms",
  "owner": {
    "email": "ada@example.com",
    "email_verified_at": "2026-03-28T20:08:58.000000Z",
    "name": "Ada Lovelace"
  },
  "reply_to_email": "hello@example.com",
  "slack_connected": false,
  "timezone": "UTC"
}

List form fields

Read the questions on a form: each one's label, its type, whether it's required, and the ID a submitted answer is filed under.

Inputs

Formform_idtextRequired
Which of your Deftform forms this step works on.

Outputs

countnumber
fieldslist
form_idtext
Example output
{
  "count": 1,
  "fields": [
    {
      "custom_key": "email_address",
      "label": "Email address",
      "options": null,
      "placeholder": "you@example.com",
      "required": true,
      "type": "email",
      "uuid": "f5fb1e1a-0a70-486b-90d9-67146b125a33"
    }
  ],
  "form_id": "OUm6T9"
}

List forms

Read every form in your Deftform workspace: its name, its ID and how many fields it has. Use it to find a form's ID, or to loop over all of them.

Inputs

Name containsname_containstext
Only forms whose name contains this text. Leave blank for all of them.

Outputs

countnumber
formslist
Example output
{
  "count": 1,
  "forms": [
    {
      "after_message": "<p>Thank you, we'll be in touch.</p>",
      "after_redirect_delay": null,
      "after_redirect_url": null,
      "captcha": null,
      "capture_location": false,
      "closed_at": null,
      "closed_message": null,
      "created_at": "2026-09-17T21:24:25.000000Z",
      "cta_label": null,
      "description": null,
      "discord_enabled": false,
      "field_count": 2,
      "google_sheets_enabled": false,
      "hubspot_enabled": false,
      "id": "OUm6T9",
      "is_closed": false,
      "name": "Contact us",
      "seo_allow_bots": false,
      "seo_description": null,
      "seo_title": null,
      "show_formtitle": true,
      "slack_enabled": false,
      "slug": "contact-us-OUm6T9",
      "updated_at": "2026-09-17T21:24:25.000000Z"
    }
  ]
}

List responses

Read a form's submissions, newest first. Each one comes back with its answers keyed by question, so a later step can read an answer by name. Narrow it to finished or abandoned submissions.

Inputs

Formform_idtextRequired
Which of your Deftform forms this step works on.
Which responsesshowtext
Abandoned submissions are only recorded when the form has 'Track incomplete submissions' switched on.One of: all (All responses), complete (Completed responses only), incomplete (Incomplete responses only). Default: all.
How manylimitnumber
The most responses to return, newest first. The result also says how many matched in total.From 1 to 500. Default: 50.

Outputs

countnumber
form_idtext
has_moretrue/false
responseslist
totalnumber
Example output
{
  "count": 1,
  "form_id": "OUm6T9",
  "has_more": false,
  "responses": [
    {
      "answers": {
        "Email address": "ada@example.com",
        "Name": "Ada Lovelace"
      },
      "created_at": "2026-09-17T21:26:11.000000Z",
      "fields": [
        {
          "label": "Name",
          "response": "Ada Lovelace"
        },
        {
          "label": "Email address",
          "response": "ada@example.com"
        }
      ],
      "id": "b8384cd3-532b-416e-b450-94a7d715e3bb",
      "is_incomplete": false,
      "number": 9,
      "number_formatted": "9",
      "referrer": null
    }
  ],
  "total": 1
}

Reopen a form

Let a closed form accept responses again. Everything else about the form is left alone.

Inputs

Form to reopenform_idtextRequired
Which of your Deftform forms this step works on.

Outputs

form_idtext
is_closedtrue/false
nametext
settings_changedlist
updated_attext
Example output
{
  "form_id": "OUm6T9",
  "is_closed": false,
  "name": "Contact us",
  "settings_changed": [
    "is_closed"
  ],
  "updated_at": "2026-09-17T09:14:22.000000Z"
}

Submit a response

Record a response against one of your forms, as though somebody had filled it in, useful for feeding a form from another system. Deftform sends no notification emails for a response added this way.

Inputs

Form to submit toform_idtextRequired
Which of your Deftform forms this step works on.
AnswersanswersobjectRequired
One box per question on the form. Leave a question blank to submit nothing for it. A file upload takes a link to a file you've already put somewhere public; Deftform can't accept an uploaded file here.

Outputs

created_attext
fields_submittednumber
form_idtext
response_idtext
submittedtrue/false
Example output
{
  "created_at": "2026-09-17T21:26:11.000000Z",
  "fields_submitted": 2,
  "form_id": "OUm6T9",
  "response_id": "b8384cd3-532b-416e-b450-94a7d715e3bb",
  "submitted": true
}

Update form settings

Change a form's name, description, button label, thank-you message, redirect, response cap, CAPTCHA or search-engine listing. Anything you leave blank is left as it is.

Inputs

Form to updateform_idtextRequired
Which of your Deftform forms this step works on.
Form namenametext
Rename the form. Up to 255 characters.
Descriptiondescriptiontext
The description shown under the form's title. Up to 1000 characters.
Submit button labelcta_labeltext
What the submit button says: 'Send', 'Apply', 'Book my place'. Up to 100 characters.
Thank-you messageafter_messagetext
What people see after they submit the form.
Redirect toafter_redirect_urltext
Send people to this address after they submit. Must be a full URL including https://.
Redirect afterafter_redirect_delaynumber
Seconds to show the thank-you message before redirecting, from 0 to 60.From 0 to 60.
Response limitresponses_limitnumber
Close the form automatically once it has this many responses.At least 1.
CAPTCHAcaptchatext
Which spam check to put in front of the form.One of: none (No CAPTCHA), altcha, turnstile (Cloudflare Turnstile), recaptcha (Google reCAPTCHA).
Search engine titleseo_titletext
The title search engines and link previews show. Up to 255 characters.
Search engine descriptionseo_descriptiontext
The description search engines and link previews show. Up to 500 characters.
Other settingsother_settingsobject
Any other Deftform form setting, by its own name (for example send_pdf_to_respondent or seo_allow_bots). This is also the only way to empty a setting: give it no value here and it is cleared, whereas a blank box above leaves the setting as it is. Use the 'Close a form' step to close one.

Outputs

form_idtext
nametext
settings_changedlist
updated_attext
Example output
{
  "form_id": "OUm6T9",
  "name": "Contact us",
  "settings_changed": [
    "cta_label",
    "name"
  ],
  "updated_at": "2026-09-17T09:14:22.000000Z"
}

On this page