The flow change will not save. Fifty versions are already there.
Salesforce keeps at most 50 versions of one flow. At that point every change that would create a new version is refused, and through the Metadata API the refusal can arrive without the reason. A version can be deleted only when it is not active and no paused interview still runs on it, and there is no undo. Below: the query that confirms the limit, what holds a version in place, and the cleanup order I follow, first proven in sandboxes. If the save fails with “we couldn’t create a new flow version because you reached the maximum number of versions for this flow”, this is that limit, and the steps below clear it.
Limits and object behaviour link to Salesforce Help and the Tooling API and object references, read on 23 November 2026. What the errors looked like is from my own deployments, marked as such.
What happens when a Salesforce flow reaches 50 versions?
Salesforce stops accepting changes to it. The flow limits page in Salesforce Help gives 50 versions per flow, and in the orgs I work in every deployed change to a flow became one more version. The Metadata API reported the refusal as a bare field integrity exception, naming no element and no field, so the first hours went on searching a file that had nothing wrong with it.
| What you do | What you see at 50 versions | Source |
|---|---|---|
| Deploy a changed flow through the Metadata API | A field integrity exception, with no element or field named | My own deployments |
| Deploy the same file unchanged | Reported as a success, and no new version appears | My own deployments |
| Send the changed flow to the Tooling API Flow object | An error whose details name the element and the field | My own deployments |
| Count the flow’s versions | 50, the number in Salesforce’s limits table | Salesforce Help |
Versions per flow: Flow Limits per Org, Salesforce Help, read on 23 November 2026.
How do you check how many versions a flow has?
With one Tooling API query on the Flow object, filtered by the flow’s API name through its definition. Run it before reading your own change for a mistake. A second query lists the versions with their status, which Salesforce documents as Active, Draft, Obsolete or InvalidDraft, so you can see which ones are candidates for removal.
SELECT COUNT(Id)
FROM Flow
WHERE Definition.DeveloperName = 'Deal_Stage_Update'SELECT Id, VersionNumber, Status, LastModifiedDate
FROM Flow
WHERE Definition.DeveloperName = 'Deal_Stage_Update'
ORDER BY VersionNumber ASCRun both with the Tooling API option on, in the Developer Console query editor or the Salesforce CLI. Status values: Flow; the active and latest version on the definition: FlowDefinition. Both Tooling API reference, read on 23 November 2026.
Which flow versions can be deleted, and what blocks a deletion?
Any version that is not active and has no paused interviews. The Tooling API reference says so directly, and adds that paused interviews must either resume and finish or be deleted first. In my cleanups interviews that had failed with an error held their version the same way. Deleting an interview needs the Manage Flow permission.
| Version | Can it be deleted? | What to do first |
|---|---|---|
| The active version | No | Activate another version, or leave this one |
| Obsolete or Draft, no interviews on it | Yes | Back it up |
| Any version with paused interviews | Not yet | Let them finish, or delete them with Manage Flow |
| Any version with interviews in Error | In my cleanups, not until they were gone | Read the error text, then delete the interviews |
| Every version of the flow | Possible, and it removes the flow | Never select them all |
| A version behind a Salesforce Survey | Yes, and the survey’s responses go with it | Check ProcessType first and export the responses |
Deletion rule: Flow, Tooling API. Interview statuses, among them Paused, Error and VersionPaused, and the Manage Flow permission: FlowInterview, object reference. Surveys: knowledge article 005321734, published 26 June 2026. All read on 23 November 2026.
Can an admin delete old flow versions in Setup, without the Tooling API?
Yes, one version at a time. From Setup, enter Flows in Quick Find and select Flows, then open the menu next to the flow and choose View Details and Versions. The Flow Versions list puts a Del link beside every inactive version; the active one offers Deactivate in its place. Each click removes one version for good, so this suits a handful of versions. For dozens, the Tooling API is faster and lets you save each version first.
| Version in the list | Links Salesforce shows | What to do |
|---|---|---|
| Active | Open, Run, Deactivate | Leave it; there is no Del link |
| Inactive (the Status column says Draft) | Open, Run, Del, Activate | Delete the oldest first, after saving a copy |
| Any version of a survey flow | Salesforce says the field that marks it is not shown in Setup | Do not delete before exporting the survey responses |
The survey row matters more than it looks. Salesforce’s knowledge article says deleting flow versions behind a Salesforce Survey also deletes the survey versions with their invitations and responses, possibly bypassing the recycle bin, and that the field marking a survey flow, ProcessType, can be read only through the API. Run this before any cleanup, with the Tooling API option on:
SELECT Definition.DeveloperName, VersionNumber, Status
FROM Flow
WHERE ProcessType = 'Survey'The path to View Details and Versions: Test a Data Cloud-Triggered Flow, Salesforce Help. Surveys: knowledge article 005321734. Both read on 23 November 2026. The links per version are as my own org showed them that day; the survey query ran there too and only reads.
In what order do you remove old flow versions safely?
Back up first, interviews second, versions last, and count at the end. A deleted version cannot be restored, so each one is saved as its own file before anything is removed. I keep the active version and the newest few untouched, start with the oldest Obsolete ones, and trust the final count from a query rather than what the delete command printed.
01Back up each version
Read every version you plan to remove through the Tooling API and save it as a separate file.
02List the interviews
Query FlowInterview for interviews still sitting on those versions, paused or failed.
03Delete the interviews
Only after reading why they stopped; a paused interview may be a person’s unfinished work.
04Delete the versions
Oldest Obsolete first, one call per version, through the Tooling API.
05Count again
The same count query as before. The number has to drop by exactly the versions you removed.
06Deploy the change
It now creates a new version, with room left below the limit.
No restore for a deleted version, and the order of steps: from my own cleanups in sandboxes, where every planned version was removed and no deletion failed.
Why can a deletion look successful when nothing was deleted?
Because the command failed and the error was lost on the way to the screen. In one cleanup a generic REST delete call through the command line refused each request for a missing parameter, but the output went through a filter and the loop looked clean. The count query then showed every version still there. A dedicated delete through the Tooling API worked on the next run.
| Signal | What it proves |
|---|---|
| The delete command printed nothing alarming | Nothing |
| The count query returns fewer versions | The versions are gone |
| The deploy now creates a new version | The flow is below the limit again |
One more behaviour is worth knowing before you script anything. The Tooling API reference says that updating a flow version really deletes it and creates a new one with a new Id, so an Id saved before an update no longer points to anything.
Update replaces the version and its Id: Flow, Tooling API, read on 23 November 2026. The failed delete calls: my own cleanup.
How do you stop a flow reaching 50 versions again?
Change it less often in production and more carefully elsewhere. In the orgs I support, small fixes saved one at a time in production were what used the limit fastest. Build and test in a sandbox, deploy one version per release, and run the count query each month on the flows that change most.
| Habit | Versions it adds |
|---|---|
| Fixing a flow in production, one save per fix | One per save, including the saves that are undone |
| Building in a sandbox, one deploy per release | One per release |
| A monthly count on the busiest flows | None, and it warns you long before 50 |
Questions buyers ask about the flow version limit
QWhat does “we couldn’t create a new flow version because you reached the maximum number of versions for this flow” mean?
It means the flow already holds as many versions as Salesforce keeps for one flow, 50, as the first section of this page shows, so a save that would create one more version is refused. Nothing is wrong with your change. Run the count query above, then remove old inactive versions in the safe order on this page, and save again.
QCan the active version of a flow be deleted?
No. The Tooling API reference allows deleting a flow version only when it is not active and has no paused interviews.
QWho may delete paused flow interviews?
A user with the Manage Flow permission, according to the FlowInterview object reference. All other calls on interviews need Run Flows or the Flow User field.
QWhat does VersionPaused mean on a flow interview?
The FlowInterview reference describes it as a paused flow version: no more records are processed until the flow is resumed. The value exists from API version 60.0.
QCan a deployment switch which version is active?
Yes, when it includes the flow definition. Salesforce documents that the active version number in the definition overrides the status in the flow file.
Serhii Skrypnyk, Senior Salesforce Administrator, Salesforce certified, on the platform since 2018. Reviewed 4 December 2026. Added in this review: the error text answered, and where to get help.
A flow that will not deploy
Send three lines: the flow’s name, the exact error text and what changed last. The reply comes from me within one working day and says whether it fits a support plan, from €680 a month for 8 hours, or is part of a repair when changes keep breaking other things, from €3,400, as on changes that break other things.
Three ways on from here. The three lines above go through the contact page. If flows keep hitting limits because nobody owns them between releases, monthly support covers automation changes like this one. If the worry is whether the records those flows write can be trusted, the data quality check is €650: one working day, read only.
Changing flows on a live org safely looks like this in practice: in the donations case, every flow change was made in development, tried in staging, deployed switched off and only then activated, with the earlier version kept ready for rollback.
