Create or update
Save data from a workflow as a record in Middle
The Create or Update Record step writes a record to Middle's storage under an app connection and record type. Use it to standardize data, store calculated summaries, or capture business events for other workflows to use.
For example, one workflow could prepare a standardized member record, while a scheduled workflow exports those prepared records to another system.
This step changes the record stored in Middle. To send that change to an external app, configure a separate action or workflow.

Before you begin
You'll need an app connection, a record type defined for that app, and the values or expressions that will build the record. The record type must include its fields and primary ID.
The step uses an existing record type. It does not create a new record type or add fields to its definition.
Add the step
Open your workflow in the editor.
Click the + on the branch where you want to save the record.
Open the Advanced menu and select Create or Update Record.
Configure the following fields.
App connection
The connection under which Middle will store the record.
Resource
The record type to create or update. Available resources belong to the selected connection's app.
Record payload
An object containing the record's field names and values. Build it using workflow parameters, including values from the triggering record, earlier steps, or calculations.
Include the primary ID and every field defined by the selected resource. Use the field keys from the record type's definition.
Supply the complete record, including when updating an existing record. Middle validates and stores the submitted payload; it does not merge a partial set of fields into the existing record.
How creates and updates work
Middle identifies a record using the combination of app connection, resource, and primary ID.
A primary ID with no stored payload
Creates the record and records a creation activity.
An existing primary ID with changed data
Updates the record and records an update activity.
An existing primary ID with identical data after validation
Leaves the stored data unchanged and reports No changes.
Use a consistent primary ID when maintaining a current value, such as a member summary. Use a distinct primary ID for each event when you want to preserve separate observations. For event records, a repeatable ID based on the source event also helps prevent a rerun from creating another copy of the same event.
Example
Suppose you have a Standard member resource with these fields:
member_id
Primary ID
name
String
organization_id
Foreign key to an organization
Configure the record payload to produce an object like this:
In a working integration, map these values from workflow variables or expressions.
The first run creates member-1. If a later run produces the same ID with the name Ada Lovelace, Middle updates that record. Running it again with the same values results in No changes.
For foreign-key fields, supply the related record's primary ID. That establishes the relationship; it does not populate the related record's data.
Use the saved record in other workflows
Created and updated records pass through Middle's normal activity-trigger processing. Configure an activity-based trigger on the destination connection and resource to run another workflow when the record is created or changed.
This lets you separate preparation from delivery. For example, one workflow can transform source data and save standardized records. A scheduled workflow can then use a File Export Step to export those records and an Action Step to deliver the file.
An unchanged record does not generate a new creation or update activity.
If a workflow writes to the same resource that triggers it, make sure its trigger conditions and update logic allow the process to stop.
Inspect and troubleshoot a run
Open the workflow execution and select the Create or Update Record step.
The execution details show:
Settings: the selected record type and app connection.
Record input: the evaluated payload used by the step.
Stored record: a link to the record and the associated activity ID, when a change occurred.
For an unchanged record, there is no new activity. Creation and update activities are linked to the workflow execution that produced them.
If the step fails, check that the app connection and resource are selected, the payload evaluates to an object, every defined field is present, the primary ID is not null, and field values match the resource's expected types.
Records, record history, and execution history remain subject to your data retention settings.
Limitations
The step saves one record per execution and does not expose the saved record as a step-output variable.
Create or Update Record is not supported in workflows executed through the Real-time Workflow API.
Related documentation
Workflow parametersTriggersFile exportLast updated
Was this helpful?

