Salesforce Process Automation

Workflow capability for Salesforce process automation combining Flow invocation, approval process management, and automation record querying. Serves admins, developers, and integration engineers managing business process automation across Salesforce organizations.

Run with Naftiko Approval ProcessAutomationCRMFlowProcess BuilderSalesforceWorkflow

What You Can Do

GET
List flows — Query active and draft Flow definitions.
/v1/flows
GET
Get flow — Get a Flow version record by ID.
/v1/flows/{id}
POST
Invoke flow — Invoke an autolaunched Flow with input variables.
/v1/flows/{flowApiName}/invoke
GET
List approval processes — List all approval process configurations.
/v1/approvals
POST
Submit approval — Submit, approve, reject, or recall approval requests.
/v1/approvals
GET
Query automation records — Query ProcessInstance, FlowInterview, or WorkflowRule records.
/v1/automation-records

MCP Tools

list-flows

Query Salesforce Flow definitions. Returns active and draft flows with their API names, labels, and statuses.

read-only idempotent
get-flow-version

Get the metadata for a specific Salesforce Flow version by record ID.

read-only idempotent
invoke-flow

Invoke a Salesforce autolaunched Flow with input variables. Returns output variable values from the flow execution.

list-approval-processes

List all approval process definitions configured in the Salesforce org.

read-only idempotent
submit-approval

Submit a record for approval, approve or reject an approval request, or recall an in-progress approval.

query-automation-records

Execute a SOQL query to retrieve ProcessInstance, FlowInterview, or WorkflowRule records from Salesforce.

read-only idempotent

APIs Used

sf-flow-automation

Capability Spec

Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "Salesforce Process Automation"
  description: >-
    Workflow capability for Salesforce process automation combining Flow invocation,
    approval process management, and automation record querying. Serves admins,
    developers, and integration engineers managing business process automation
    across Salesforce organizations.
  tags:
    - Approval Process
    - Automation
    - CRM
    - Flow
    - Process Builder
    - Salesforce
    - Workflow
  created: "2026-05-02"
  modified: "2026-05-02"

binds:
  - namespace: env
    keys:
      SALESFORCE_OAUTH2_TOKEN: SALESFORCE_OAUTH2_TOKEN
      SALESFORCE_INSTANCE_URL: SALESFORCE_INSTANCE_URL

capability:
  consumes:
    - import: sf-flow-automation
      location: ./shared/salesforce-automation-flow.yaml

  exposes:
    - type: rest
      port: 8080
      namespace: salesforce-process-automation-api
      description: "Unified REST API for Salesforce process automation workflows."
      resources:
        - path: /v1/flows
          name: flows
          description: "Salesforce Flow definitions and invocation."
          operations:
            - method: GET
              name: list-flows
              description: "Query active and draft Flow definitions."
              call: "sf-flow-automation.query-flow-definitions"
              with:
                q: "rest.q"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/flows/{id}
          name: flow-by-id
          operations:
            - method: GET
              name: get-flow
              description: "Get a Flow version record by ID."
              call: "sf-flow-automation.get-flow-version"
              with:
                id: "rest.id"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/flows/{flowApiName}/invoke
          name: flow-invocation
          operations:
            - method: POST
              name: invoke-flow
              description: "Invoke an autolaunched Flow with input variables."
              call: "sf-flow-automation.invoke-flow"
              with:
                flowApiName: "rest.flowApiName"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/approvals
          name: approvals
          description: "Approval process management."
          operations:
            - method: GET
              name: list-approval-processes
              description: "List all approval process configurations."
              call: "sf-flow-automation.list-approval-processes"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: POST
              name: submit-approval
              description: "Submit, approve, reject, or recall approval requests."
              call: "sf-flow-automation.submit-approval-request"
              outputParameters:
                - type: array
                  mapping: "$."
        - path: /v1/automation-records
          name: automation-records
          description: "Query automation-related Salesforce records."
          operations:
            - method: GET
              name: query-automation-records
              description: "Query ProcessInstance, FlowInterview, or WorkflowRule records."
              call: "sf-flow-automation.query-automation-records"
              with:
                q: "rest.q"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9080
      namespace: salesforce-process-automation-mcp
      transport: http
      description: "MCP server for AI-assisted Salesforce process automation."
      tools:
        - name: list-flows
          description: >-
            Query Salesforce Flow definitions. Returns active and draft flows
            with their API names, labels, and statuses.
          hints:
            readOnly: true
            idempotent: true
          call: "sf-flow-automation.query-flow-definitions"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-flow-version
          description: "Get the metadata for a specific Salesforce Flow version by record ID."
          hints:
            readOnly: true
            idempotent: true
          call: "sf-flow-automation.get-flow-version"
          with:
            id: "tools.id"
          outputParameters:
            - type: object
              mapping: "$."
        - name: invoke-flow
          description: >-
            Invoke a Salesforce autolaunched Flow with input variables.
            Returns output variable values from the flow execution.
          hints:
            readOnly: false
            destructive: false
          call: "sf-flow-automation.invoke-flow"
          with:
            flowApiName: "tools.flowApiName"
          outputParameters:
            - type: object
              mapping: "$."
        - name: list-approval-processes
          description: "List all approval process definitions configured in the Salesforce org."
          hints:
            readOnly: true
            idempotent: true
          call: "sf-flow-automation.list-approval-processes"
          outputParameters:
            - type: object
              mapping: "$."
        - name: submit-approval
          description: >-
            Submit a record for approval, approve or reject an approval request,
            or recall an in-progress approval.
          hints:
            readOnly: false
            destructive: false
          call: "sf-flow-automation.submit-approval-request"
          outputParameters:
            - type: array
              mapping: "$."
        - name: query-automation-records
          description: >-
            Execute a SOQL query to retrieve ProcessInstance, FlowInterview,
            or WorkflowRule records from Salesforce.
          hints:
            readOnly: true
            idempotent: true
          call: "sf-flow-automation.query-automation-records"
          with:
            q: "tools.q"
          outputParameters:
            - type: object
              mapping: "$."