Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs-v2/pages/code/nodejs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,14 @@ In general, if you just need to make an HTTP request but don't care about the re

You can return HTTP responses from [HTTP-triggered workflows](/workflows/steps/triggers/#http) using the [`$.respond()` function](/workflows/steps/triggers/#http-responses).

## Invoke another workflow

<Callout type="warning">
This is an alpha feature and is subject to change without prior notice.
</Callout>

You can invoke another workflow in your workspace by running `await $.flow.trigger(workflowId, event)`, where `event` is an object containing the data to send to the workflow. Here's how you can [find your workflow's ID](/troubleshooting#where-do-i-find-my-workflows-id). This invocation remains within Pipedream — you don't need to configure a trigger, and the request does not leave the platform.
Copy link
Contributor

@dylburger dylburger Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend making this a bit more structured and add a full code example like in other docs, e.g.


You can invoke another workflow in your workspace with $.flow.trigger:

$.flow.trigger(
  workflowId, // Your Pipedream workflow ID, e.g. p_abc123
  payload // any JSON-serializable data
)

Find your workflow's ID here.

This invokes the workflow directly — you don't need to configure a trigger, and the request does not leave the platform.


## Ending a workflow early

<VideoPlayer title="Conditionally run Workflows" src="https://www.youtube.com/embed/sajgIH3dG58" startAt="205" />
Expand Down
4 changes: 4 additions & 0 deletions docs-v2/pages/code/python/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ Unlike the [Node.js equivalent](https://pipedream.com/docs/workflows/steps/trigg
_Don't forget_ to [configure your workflow's HTTP trigger to allow a custom response](/workflows/steps/triggers/#http-responses). Otherwise your workflow will return the default response.
</Callout>

## Invoke another workflow

This is currently not supported in Python steps. However, you can invoke another workflow using Node.js steps. For more information, see [Invoke another workflow in Node.js](/code/nodejs#invoke-another-workflow).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend documenting the HTTP trigger flow, since you can still call a workflow with that. Then maybe just remove the reference to the Node.js stuff for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually removed it from the Python docs and added it to the Troubleshooting docs. Also added the built-in action reference


## Sharing data between steps

A step can accept data from other steps in the same workflow, or pass data downstream to others.
Expand Down
Loading