Skip to main content
Human surveys support email delivery to respondents, scheduled send campaigns, and event-triggered callbacks. All of these are managed through HumanSurveyNotificationHandler, a convenience wrapper that binds to a specific human survey so you don’t have to pass the UUID on every call.
The survey must have an agent list with an email delivery channel configured before any notifications can be sent. Set this up when calling survey.humanize() by passing agent_list and delivery_map arguments.

Getting a handler

A Coop client is created automatically. Pass one explicitly if you need a specific API key or base URL:

Statuses

Every delivery task moves through two independent status tracks.

Dispatch status

Controls whether the platform has attempted to hand off the message to the downstream channel (e.g. the email provider).

Delivery status

Reflects what the email provider reports back after dispatch.

Response status

Tracks whether a respondent has engaged with the survey itself.

Quickstart examples

Send an email right now

Trigger an immediate delivery to all respondents.
Pass a custom subject, HTML email body, or restrict which respondents receive it:

Schedule a one-time email

Schedule a single delivery at a specific time. run_at must be a timezone-aware datetime or an ISO 8601 string.
Update the time before it fires:

Schedule recurring emails (cron)

Send emails on a repeating schedule using standard cron syntax. Provide either max_jobs (fire at most N times) or deadline (stop firing after this datetime) as the termination condition. Use start_at to delay when the schedule begins firing; omit it to start immediately.
With a deadline instead:
With a delayed start:
Pause and resume a schedule:

React when someone completes the survey (callback)

A respondent is a person with a corresponding entry in the survey’s agent list. Each respondent has a unique survey link and a tracked response status. Submissions from people outside the agent list (e.g. anonymous links) are not associated with a respondent. create_callback sends emails to respondents in your agent list. Two respondent event types are supported:
Limit how many times the callback fires (e.g. only notify for the first 100 completions):

Notify the owner on every new response

Use create_owner_response_callback to email the survey owner each time a response is submitted. This fires for all responses, including anonymous ones — not just respondents in the agent list.

Send a transcript after each submission

Use create_transcript_callback to automatically email a transcript each time a response is submitted. Pass recipient to control who receives it:
  • "respondent" (default) — emails each respondent a copy of their own answers.
  • "owner" — emails the survey owner a copy of the answers. Fires for all submissions, including anonymous ones.
Activate and deactivate:

Filter which respondents receive a delivery

HumanizeRespondentFilter lets you compose conditions to target specific subsets of respondents. Conditions can be nested with and / or operators.
Available condition fields:

Check delivery status

List all delivery jobs for the survey:
Inspect a specific delivery job:
Drill into individual tasks (one per respondent per delivery):
Get a single delivery task by UUID:

Route types

Each delivery or schedule sends email to survey respondents via a RespondentEmailRouteConfig route. A delivery template is always required; convenience methods like send_respondent_email default to the built-in invitation template when none is provided. RespondentEmailRouteConfig options:

Template variables

Custom HTML templates support the following variables, which are filled in per-respondent at send time: Example:
Update the subject and template on an existing respondent email route on a schedule:
Update the subject and template on an existing respondent email route on a callback:

Managing respondents

List all respondents and their current response status:
Check and update the agent list delivery configuration (the trait column that holds each respondent’s email address):