Skip to content

Update AI Block In Email Editor

Tool name: update-email-editor-ai-block

Changes the instruction, name, data fields or tags of an existing AI block (Smart Mail) of an automation email; what is omitted stays, a passed list replaces the old one. The previous instruction is not kept. Foreign field or tag ids are refused. Removing the block is remove-email-editor-block. Revision-bound, atomic edit: put every change to one email into one call, never parallel calls; drafts only; publishing is publish-newsletter-email-content.

Input schema

editorUrlstring, [ 12 .. 500 ] charactersrequired

Editor URL of the email, as a read returned it

contentRevisionstring, [ 7 .. 100 ] charactersrequired

The contentRevision of the read this change is based on

uuidstring, [ 1 .. 100 ] charactersrequired

The blockUuid of the AI block, as list-email-editor-ai-blocks answers it

promptnull or string, [ 1 .. 10000 ] characters

The new instruction; omit to keep it

Default:null
namenull or string, [ 1 .. 250 ] characters

The new name; omit to keep it

Default:null
fieldIdsArray of strings, <= 100 items

The data field ids it may use, replacing the list; omit to keep, [] to clear

Default:null
tagIdsArray of integers, <= 100 items

The tag ids it may use, replacing the list; omit to keep, [] to clear

Default:null
accountIdnull or integer, >= 1

User ID of the account; omit for the account of the access token

Default:null
Input example
{ "editorUrl": "stringstring", "contentRevision": "strings", "uuid": "string", "prompt": null, "name": null, "fieldIds": null, "tagIds": null, "accountId": null }

Output schema

One of:
operationstringrequired

"replaced": the stored document is a new one; "unchanged": nothing was persisted.

Enum:"replaced""unchanged"
previousContentStatusstringrequired
Enum:"draft""published""unpublished_changes"
contentStatusstringrequired
Enum:"draft""published""unpublished_changes"
emailIdintegerrequired
contentRevisionstringrequired
warningsArray of stringsrequired
editorUrlstringrequired
createdArray of objectsrequired

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.

nextActionstringrequired

The content action still open: "review_and_publish_content" while the stored draft is not the dispatch content.

Enum:"review_and_publish_content""none"
Output example
{ "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" }