Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
21 changes: 21 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,27 @@ 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 with `$.flow.trigger`:

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

[Find your workflow's ID here.](/troubleshooting#where-do-i-find-my-workflows-id)

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

We also provide a [Trigger Workflow](https://pipedream.com/apps/helper-functions/actions/trigger-workflow) action in the [Helper Functions](https://pipedream.com/apps/helper-functions) app so you don't need to do it by code!

## Ending a workflow early

<VideoPlayer title="Conditionally run Workflows" src="https://www.youtube.com/embed/sajgIH3dG58" startAt="205" />
Expand Down
6 changes: 6 additions & 0 deletions docs-v2/pages/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ https://pipedream.com/@dylburger/p_abc123/edit

Your workflow's ID is the value that starts with `p_`. In this example: `p_abc123`.

## How do I invoke another workflow?

We provide a [Trigger Workflow](https://pipedream.com/apps/helper-functions/actions/trigger-workflow) action in the [Helper Functions](https://pipedream.com/apps/helper-functions) app. [See more here](/code/nodejs#invoke-another-workflow).

Another option is to make an HTTP request to a Pipedream HTTP webhook trigger.

## Where do I find my event source's ID?

Open [https://pipedream.com/sources](https://pipedream.com/sources) and click on your event source. Copy the URL that appears in your browser's address bar. For example:
Expand Down
Loading