[SalesForce] ERROR running force:source:pull: Entity of type ‘Workflow’ named ‘Workflow’ cannot be found

I am having issues when pulling Workflows using SFDX with VS Code.
The error that I get when pulling in the Workflow (sfdx force:source:pull) is:

ERROR running force:source:pull:  Entity of type 'Workflow' named 'Workflow' cannot be found

Does anyone have any idea on how to resolve this?

I heard that one fix is to downgrade the sfdx-cli to version 7.26.0 which I am not able to.

Best Answer

To avoid the error on running sfdx force:source:pull run the following query through the tooling API and delete any records it returns (easily done in Dev Console):

SELECT Id, MemberType, MemberName FROM SourceMember WHERE MemberType = 'Workflow'

If you have any workflow metadata which you need to retrieve then use sfdx force:source:retrieve to pull these from the scratch org.