- Add AI Block To Email Editor
Tool name: add-email-editor-ai-block
Adds an AI block (Smart Mail) to a column of an automation email: its text is generated per recipient from the instruction, the AI context and the data fields and tags named. Other emails are refused; foreign field or tag ids too. Every recipient then costs credits, see estimate-smart-mail-cost. Without the add-on the block is saved with a warning. Returns the new uuid. Revision-bound, atomic edit: put every change to one email into one call, never parallel calls; drafts only; publishing is publish-newsletter-email-content.
The contentRevision of the read this change is based on
The instruction the text of this block is generated from, per recipient
Data field ids (search-custom-fields) the block may use; omit for those of the AI context
Tag ids (search-tags) the block may use; omit for those of the AI context
Where it goes inside the column, counted from zero; omit to append
{ "editorUrl": "stringstring", "contentRevision": "strings", "columnUuid": "string", "prompt": "string", "name": null, "fieldIds": null, "tagIds": null, "position": null, "accountId": null }
"replaced": the stored document is a new one; "unchanged": nothing was persisted.
What this write created, with uuids: after "addRow" the row and its columns, after "addModule" the block, plus the contentRevision the next write needs. Empty when nothing was created.
{ "operation": "replaced", "previousContentStatus": "draft", "contentStatus": "draft", "emailId": 0, "contentRevision": "string", "warnings": [ "string" ], "editorUrl": "string", "created": [ { "operation": 0, "type": "row", "uuid": "string", "kind": "string", "columns": [ "string" ] } ], "nextAction": "review_and_publish_content" }