I know we can fetch Active Version and latest version details using Tooling API from FlowDefinition, however is there a way we can fetch sObject details?

  • 1
    Hi @sfdcfox, I hope you can help me here. How do we get sObject name in the query?
    – Ajay
    Aug 19, 2019 at 21:25

1 Answer 1


You can only get sObject details if you add an Id = 'flowId' to your query in the Tooling API or call the /tooling/flow/flowId endpoint.

The info is in the Metadata of the flow which you can only pull when you get one record. You'd have to query all process builders (Process Type = 'Workflow') and then get the info for each specific process builder returned to get the sObject label with /tooling/flow/flowId or, if you have the Ids, query with a Id = flowId for each flow (or combine into one composite request).

I simplified what comes back in the "Metadata" portion of the response to only include the processMeatadataValues you'd be interested in. It's under the "ObjectType" name and contains the label in stringValue

 "Metadata" : {
"processMetadataValues" : [ {
      "name" : "ObjectType",
      "value" : {
        "booleanValue" : null,
        "dateTimeValue" : null,
        "dateValue" : null,
        "elementReference" : null,
        "numberValue" : null,
        "stringValue" : "Account"

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.