Get previous values is an action that loads the previous version of the current record, so later actions can use what the fields contained before the change (the trigger decides when the automation runs, and the action decides what happens). It's meant to help you react to what changed, not only to the new value.
You can use this action for many things, including:
Saving the old status of a deal in a history app before the new one replaces it.
Putting a field back to its old value after someone without rights changed it.
Note:
The action needs a changed record. It works on the current record, so it isn't offered after
On a scheduled time or intervalorWhen a webhook is received. It's most useful afterWhen a record is updated.It only reads. The action doesn't change anything. Use it together with
Update recordorCreate record.
Who can use the Get previous values action?
Automations are available on the Free, Plus, and Premium plans. The number of automation actions per month depends on your plan. See the limits for your plan on our pricing page.
To add or change this action, you need to be a workspace admin of the workspace the app is in. You also need full access to every app the automation uses.
Add the Get previous values action
To read the previous values from an automation:
Open the database app on desktop or web and click the automations icon in the top bar (tooltip
Create and view automations).Open an automation, or select
New automationand chooseWhen a record is updated.Select
Add action→Get previous values. The step appears asGet previous values of the current record.Add the action that uses the old values, for example
Update record.Select
Create automationfor a new automation, orSave changesfor an existing one.
Get previous values settings
The action has no fields to fill in. In its ••• menu, under the headline Settings, you find Continue on error, Deactivate, Turn into, Duplicate, and Remove. There's no Author or Silent, because the action doesn't change records. Learn more about action settings →
Use the previous values
After the action, the old values are available to the actions below it, next to the current values of the record. In a text box, you insert them like any other record value. In the list of values, select the group <record name> previous values, for example Lead previous values. Its entries are marked Previous value.
To log a change, insert the old value in a field of a record created by
Create record.To undo a change, set the field back to the old value with
Update record.To check what changed, use a filter such as
Has changedorHas changed to. Learn more about change filters →
Let's look at an example
Let's say your sales team wants to keep a history of every stage change. Here's how:
Set the trigger to
When a record is updatedand select theStagefield.Select
Add action→Get previous values.Select
Add action→Create recordand choose theStage historyapp.Set
Titleto theCompanyfield of the lead.Set
Old stagetoStagefrom the groupLead previous values, andNew stageto the current value.Select
Create automation.
The next time a lead changes stage, Stage history gets a record, for example with the title "Acme Solar", Old stage "Qualified", and New stage "Offer sent".
Get previous values errors
On a new record, there are no earlier values yet. The step still succeeds and returns the values the record was created with.
If the step fails, the run shows the step and its message. Open the automation and click
▷next toManual run(tooltipView all runs), or presscmd/ctrl+1. Each run shows its status, for exampleSuccess; select a run to see every step. For all automations, openRunsin the Automation Center and filter byApp,Automation, orStatus.
Test, pause, or edit the Get previous values action
Manual runruns the automation once. Next toRun on, choose the records, then selectStart run. If you have unsaved changes, the button readsSave and start run. In a manual run, the action returns the version before the record's last change.To stop only this action, click
•••next to it and turn onDeactivate.To change the automation, open it, select the step, make your changes, then select
Save changes.
Learn more
FAQs
Can I get the previous value of one field only?
Can I get the previous value of one field only?
Yes. The action loads the whole previous version, and you insert only the fields you need in later actions.
Can I use previous values in a filter?
Can I use previous values in a filter?
Yes. After Get previous values, conditions such as Has changed are available in Conditional actions for fields of the current record. They check the change that started the run. This only works with the trigger When a record is updated. Learn more about change filters →
Can I see older versions than the previous one?
Can I see older versions than the previous one?
No, not with this action. Get previous values returns the version right before the change that started the automation.
Can I undo a change with this action?
Can I undo a change with this action?
Yes. Combine it with Update record: set the field back to its old value. Learn more about undoing changes →
Are there other actions I can use?
Are there other actions I can use?
Yes! Actions can create and update records, add comments, send emails, create PDFs, call other services, and more. See every action in Automation actions →
Are you a developer using the Tape API for automations?
Are you a developer using the Tape API for automations?
The automation API has its own documentation for developers. Full reference: current_record_get_previous_revision in the developer docs →
Still have questions? Find answers and get help from community experts in the Tape community →
