# client.ListWorkflow(), called from an activity

**URL:** <https://community.temporal.io/t/client-listworkflow-called-from-an-activity/2814>\
**Category:** Community Support\
**Tags:** go-sdk, elasticsearch\
**Created:** [August 27, 2021, 2:56pm UTC](https://community.temporal.io/t/client-listworkflow-called-from-an-activity/2814 "2021-08-27T14:56:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![johanforssell](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@johanforssell](https://community.temporal.io/u/johanforssell)\
**Post date:** [August 27, 2021, 2:56pm UTC](https://community.temporal.io/t/client-listworkflow-called-from-an-activity/2814/1 "2021-08-27T14:56:01Z")

</div>

Looking at `https://github.com/temporalio/samples-go/blob/master/searchattributes/searchattributes_workflow.go` we can see `c.ListWorkflow()` being called from an activity.

Looking at the source code [client.go](https://github.com/temporalio/sdk-go/blob/106f3c75247f5357812d3eb39d342a11febad74e/client/client.go#L28) we find the following comment

```auto
// Package client is used by external programs to communicate with Temporal service.
// NOTE: DO NOT USE THIS API INSIDE OF ANY WORKFLOW CODE!!!

```

I assume I can call this API just fine from outside of a workflow - but is it indeed ok to call it inside as well?

---

<div class="post-metadata">

**Author:** ![johanforssell](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@johanforssell](https://community.temporal.io/u/johanforssell)\
**Post date:** [August 27, 2021, 3:01pm UTC](https://community.temporal.io/t/client-listworkflow-called-from-an-activity/2814/2 "2021-08-27T15:01:50Z")

</div>

I assume the answer is: “activities are not part of the workflow, so this is fine”

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [August 27, 2021, 3:06pm UTC](https://community.temporal.io/t/client-listworkflow-called-from-an-activity/2814/3 "2021-08-27T15:06:12Z")

</div>

Workflow client internally makes gRPC calls to the Temporal service and it can’t be used directly in workflow code (these calls can break workflow determinism). You can use inside Activities, yes.
