collected_records_send_email
Internal beta โ config shape is being migrated
The Automation API is an internal beta and is not released yet โ endpoints and payloads may change or be
withdrawn without notice. This action's config is being migrated to a typed schema; the fields below reflect that
in-progress shape. Always read the authoritative, live shape from
GET /v1/automation/meta/action before building against it.
Send email for collected records โ sends one email per record in a collection produced by an earlier action. group: "action". No specific trigger context is required.
Part of the Email & documents family. This page
documents the typed config; for how an action sits inside an automation definition, see
Actions and Action examples.
Configโ
| Key | Type | Required | Description |
|---|---|---|---|
to_address | template value | yes | Recipient address(es). |
subject | template value | yes | Email subject. |
record_collection | reference | no | The record collection to send one email for each of โ a prior action's record_collection output. Omitted โ the enclosing for-loop's collection. |
reply_address | template value | no | Reply-to address. Empty when omitted. |
cc_address | template value | no | CC address(es). Empty when omitted. |
bcc_address | template value | no | BCC address(es). Empty when omitted. |
from_address | template value | no | Sender address. Empty when omitted. |
from_name | template value | no | Sender display name. Empty when omitted. |
message_body | template value | no | HTML email body. Empty when omitted. |
smtp_account_id | integer | no | Id of the SMTP account to send from. Omitted โ the organization's default SMTP account. |
attach_files_variable_defs | array of references | no | File variables whose files are candidates for attachment. Empty when omitted. |
attach_files_match_type | enum | no | Which candidate files are attached. Default all. |
attach_files_match_condition | filter group | null | no | Restricts attached files for the filtered / most_recent_filtered modes. Empty condition ("match all") when omitted or null. |
fields_expanded | boolean | no | Editor-only UI flag: whether the address fields are expanded in the editor. Omitted from the live discovery schema (like create_pdf's *_expanded flags); carried through on read when present. |
attach_files_match_type tokens (lower-case): all, filtered, most_recent, most_recent_filtered. all and
most_recent ignore the condition; filtered and most_recent_filtered restrict to files matching
attach_files_match_condition.
Exampleโ
An action entry inside an automation definition's actions[]:
{
"type": "collected_records_send_email",
"config": {
"record_collection": { "kind": "variable", "source": "action", "action_type": "record_collection", "app_id": 812 },
"to_address": ["[email protected]"],
"subject": ["Record update: ", { "kind": "variable", "source": "meta", "meta_type": "app_record_id" }],
"message_body": ["<p>One of the collected records changed.</p>"],
"smtp_account_id": 812
}
}
Validation & behaviorโ
- Structurally identical to
send_email, plus the optionalrecord_collectionreference: the action sends one email per record in the collection. - The discovery schema serves
to_addressandsubjectas required; the typed DTO carries every template field as optional and the mapper fills the empty template ([]) when omitted (beta โ see meta/action). - With
record_collectionomitted, the action consumes the record collection bound by the enclosing for-loop. - Every other address/name/body template defaults to empty;
attach_files_variable_defsdefaults to[],attach_files_match_typetoall, andattach_files_match_conditionto the empty "match all" condition. - With
smtp_account_idomitted, the send uses the organization's default SMTP account. Automation email sends draw down the organization's shared 24-hour send quota.
See alsoโ
- Dynamic values โ template values and references
- Filters โ the filter-group shape used by
attach_files_match_condition - Action examples ยท Actions catalog