Skip to main content

Content Edit action

Saves or deletes one record. In the action picker it is Content Edit, under General Actions. With no connection it acts on the content types defined in this workspace on the Content Types page; with a Brightspot connection it acts on content in that CMS, where it also offers the CMS's own verbs. One node, one operation picked from what the chosen store can do.

Fields​

FieldRequiredDescription
ConnectionNoLeave empty to act on this workspace's records. Pick a Brightspot connection to act on content in that CMS.
SiteNoShown only for a Brightspot connection: the site to act on. Blank means the connection's site when it pins exactly one, otherwise every site the connection reaches.
Content TypeDependsThe record's type. Needed to create a record, and to look one up by any field other than the id.
Lookup FieldNoHow the record is identified. Leave it blank, and the placeholder reads the content id, or pick one of the type's unique fields, such as a slug or an external id. The picker lists only the id and the fields marked Unique on the content type.
Lookup ValueDependsThe value the lookup field must equal, usually bound to an upstream node's content id. Every operation needs one except a Save that creates. If you bind a variable here and it resolves to nothing, the step fails rather than treating the empty value as a request to create.
RevisionNoShown only for a Brightspot connection, and for Save, Publish, Transition and Delete: one of the content's unpublished revisions to act on instead of the content itself, usually bound to a trigger's Revision › ID. Leave it blank for the content as it stands. See Revisions.
OperationYesWhat to do. The workspace offers Save, Delete, Archive and Restore; a Brightspot connection adds Publish, Transition, Post Comment and Complete Work Stream Item. Every verb exists once; each store says which it offers.

Naming the record works the same way as on Content Fetch: by id unless you pick a unique field. A lookup by a field that finds nothing fails the step for every operation but a Save with Create If Missing.

Save​

Creates or updates a record. Which one it does follows from what you set on the node:

  • A Lookup Value means update the record it names, whether by id or by a unique field.
  • A Content Type with no Lookup Value means create a new record.
  • Create If Missing, shown once a Lookup Value is set, turns a lookup that finds nothing into a create instead of a failure: under the given id when looking up by id, or with the lookup field set to the lookup value otherwise, so the next lookup finds it. Needs a Content Type.
  • Keep Live Unchanged, shown for a Brightspot connection, saves changes to live content as a new revision instead of publishing them, so live stays as it is until someone publishes the revision. A draft, or the revision named in Revision, is saved where it is either way.
  • Revision Name names the revision Keep Live Unchanged starts. A later Save with the same name updates that pending revision instead of starting another, so an automation that runs every night refines one revision rather than stacking up new ones.

Values is where the record's values come from, one or the other:

  • Simple Fields — one row per top-level field, each with a value that accepts variables. The field picker lists the chosen type's plain fields — text, true/false, number, dates and times, and lists and sets of those. A field that holds another record (a reference, an embedded object, rich text, a file) is set through Differences instead, where the value keeps the shape it is stored in. Right for a record whose values are plain, such as updating a title or setting a status.
  • Differences — a variable holding a JSON object of field changes keyed by record id, the shape a Script node's dari SDK produces with diff(...).byRecord or toDifferences().byRecord. Use it for records a script builds, including anything with embedded objects; the SDK knows the content model, so the script never deals with the stored shape. The field takes a variable, not typed JSON, and the picker offers only values declared as objects, so set the Script's Output Type to an Object with no fields (see Making it pickable downstream). Before saving, the step checks that the value is an object keyed by record ids with an object of fields under each, and fails with the reason if not; whether those fields suit the record is checked by the save itself.

A Save that matches a record and changes no value fails rather than reporting a silent success; a Save with Create If Missing is exempt, since finding the record already as asked is the request being satisfied.

Under a dry run a Save writes nothing and logs what it would have done: which fields would change on the record it found, or that a record would be created, or the reason it would fail.

Delete, Archive, Restore​

Delete removes the record for good. Archive is the reversible alternative: the record leaves every listing and Restore brings it back. Both work on workspace records and on content in a connected CMS.

Revisions​

With a Brightspot connection, Revision points an operation at one of the content's unpublished revisions. Bind it to a trigger's Revision › ID, and the step follows whatever the editor or the event was on: a revision when there is one, and the content itself when the trigger fired on live content.

OperationRevision blankA revision's id
SaveThe content: publishes live content, or saves a draft in place. With Keep Live Unchanged, live content gets a new revision instead.Saves into that revision, on top of its earlier changes. Live is untouched.
PublishPublishes the content. A draft that was never published is published properly, leaving its workflow.Merges the revision into live and keeps it as a version, the way a scheduled publish does. Other revisions are kept.
TransitionMoves the content, meaning a draft in a workflow.Moves the revision through the workflow. Its final transition merges it into live and publishes it.
DeleteDeletes the whole content.Discards only that revision.

A past version's id is refused for every operation, since a version can't be edited, published, moved or discarded. So is a revision of other content, and a revision of a variation. Archive, Restore, Post Comment and Complete Work Stream Item always act on the content, and hide the field.

warning

A Delete whose Revision is bound to a variable that resolved to nothing is refused rather than run. A blank Revision means the whole content, so without that guard a Delete meant to discard the revision an editor had open would delete the article when pressed on live content.

These operations need the matching permissions on the connected CMS, checked for the connection's user: publish to publish, delete to delete, the transition's own permission to transition, and the workflow state's save permission to save content in a workflow state. They also need the Esca Automations server module release that added them; with an earlier one the node says which release it needs.

Output​

Every operation reports the record it acted on:

FieldDescription
idThe id of the record saved, deleted, or otherwise acted on.
revisionSave only: which revision the Save wrote, including a new revision's id when Keep Live Unchanged started one. Bind a later step's Revision to its revisionId to keep working on the same revision.

Scope​

A workspace's records are the records of the content types it defines, owned by it, and nothing else. A content id or type id from another workspace reads as not found at run time, not only in the form. With a connection, the same is true of content the connection cannot reach.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.