# Invoking Go activity from python workflow

**URL:** <https://community.temporal.io/t/invoking-go-activity-from-python-workflow/6447>\
**Category:** Community Support\
**Tags:** go-sdk\
**Created:** [November 10, 2022, 1:02pm UTC](https://community.temporal.io/t/invoking-go-activity-from-python-workflow/6447 "2022-11-10T13:02:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nehapatil7199](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@nehapatil7199](https://community.temporal.io/u/nehapatil7199)\
**Post date:** [November 10, 2022, 1:02pm UTC](https://community.temporal.io/t/invoking-go-activity-from-python-workflow/6447/1 "2022-11-10T13:02:52Z")

</div>

Hi,

I’m trying to invoke Go activity from Python workflow.  
Please let me know if you have any sample code for such use case.

Also, is it possible to invoke go/python activity from NodeJS workflow?

---

<div class="post-metadata">

**Author:** ![Chad\_Retz](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/chad_retz/32/1396_2.png) [@Chad\_Retz](https://community.temporal.io/u/Chad_Retz)\
**Post date:** [November 10, 2022, 1:09pm UTC](https://community.temporal.io/t/invoking-go-activity-from-python-workflow/6447/2 "2022-11-10T13:09:17Z")

</div>

> [@nehapatil7199](#):
>
> Please let me know if you have any sample code for such use case.

There is an example for the inverse (invoking Python activity from Go): [https://github.com/temporalio/samples-python/tree/main/activity\_worker](https://github.com/temporalio/samples-python/tree/main/activity_worker). You can apply the same logic.

If you want the same task queue, you’ll want a Go activity-only worker (so make sure you set `DisableWorkflowWorker` in the Go worker options) and a Python workflow-only worker (so don’t pass any activities to the worker). Then in the Python workflow, you can `execute_activity` with the string name of the Go activity. Or if you want type checking in Python, you can make an empty stub of an activity with the same Go name (`@activity.defn(name="GoFunctionName")`) and parameter types and then reference that in `execute_activity`.

> [@nehapatil7199](#):
>
> Also, is it possible to invoke go/python activity from NodeJS workflow?

Yes, every Temporal language’s workflows can invoke every other Temporal language’s activities.

---

<div class="post-metadata">

**Author:** ![nehapatil7199](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@nehapatil7199](https://community.temporal.io/u/nehapatil7199)\
**Post date:** [November 10, 2022, 2:21pm UTC](https://community.temporal.io/t/invoking-go-activity-from-python-workflow/6447/3 "2022-11-10T14:21:56Z")

</div>

Hi Chad Retz,

Thanks for your quick reply. Will check the sample you have given for go-python.

Also, I’m trying following use case:

**Invoking python/go activity from Nodejs workflow**

Checked [this](https://github.com/temporalio/temporal-polyglot) sample but it doesn’t include above use case.  
If you have any sample code for this use case let us know. Will refer that.

---

<div class="post-metadata">

**Author:** ![Chad\_Retz](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/chad_retz/32/1396_2.png) [@Chad\_Retz](https://community.temporal.io/u/Chad_Retz)\
**Post date:** [November 10, 2022, 2:41pm UTC](https://community.temporal.io/t/invoking-go-activity-from-python-workflow/6447/4 "2022-11-10T14:41:25Z")

</div>

> [@nehapatil7199](#):
>
> If you have any sample code for this use case let us know. Will refer that.

We don’t necessarily have a sample for every permutation of languages calling other languages (it’d be 5! samples currently) and that repo seems to have older version of TypeScript SDK. You should be able to create an interface for the other-language activities and use [Namespace: workflow | Temporal TypeScript SDK API Reference](https://typescript.temporal.io/api/namespaces/workflow#proxyactivities). See the example there.

Also remember that an activity worker must have all the same activities for a task queue, so you can’t split activities of a task queue on different languages/workers. It would be best to use a different task queue for each set of activities/workflows.
