-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add $.flow.trigger #13997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add $.flow.trigger #13997
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes introduce documentation updates related to invoking workflows within the Pipedream platform. A new section describes how to use Changes
Possibly related PRs
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (2)
docs-v2/pages/code/python/index.mdx (1)
129-131: LGTM!The documentation note provides clear and helpful information about the limitation of invoking workflows in Python steps. Directing users to the Node.js alternative is a good solution.
Please update the spelling of "Node.js" to match the official spelling:
-This functionality 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). +This functionality 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).Tools
LanguageTool
[uncategorized] ~131-~131: The official spelling of this programming framework is “Node.js”.
Context: ... see Invoke another workflow in Node.js. ## Sharing d...(NODE_JS)
docs-v2/pages/code/nodejs/index.mdx (1)
355-362: Documentation for the new "Invoke another workflow" feature looks good!The documentation provides a clear explanation of the new feature, including:
- How to use the
await $.flow.trigger(workflowId, event)syntax to invoke another workflow.- Clarification that the invocation remains within the Pipedream environment.
- A warning that the feature is currently in alpha status and subject to change.
To further enhance the documentation, consider adding:
- A note about any known limitations or edge cases of the feature, if applicable.
- A more detailed example showcasing how to use the feature in a real-world scenario.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- docs-v2/pages/code/nodejs/index.mdx (1 hunks)
- docs-v2/pages/code/python/index.mdx (1 hunks)
Additional context used
LanguageTool
docs-v2/pages/code/python/index.mdx
[uncategorized] ~131-~131: The official spelling of this programming framework is “Node.js”.
Context: ... see Invoke another workflow in Node.js. ## Sharing d...(NODE_JS)
docs-v2/pages/code/python/index.mdx
Outdated
|
|
||
| ## 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). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
docs-v2/pages/code/nodejs/index.mdx
Outdated
| 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. |
There was a problem hiding this comment.
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
)This invokes the workflow directly — you don't need to configure a trigger, and the request does not leave the platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (2)
docs-v2/pages/troubleshooting.mdx (2)
65-70: Approved the new "How do I invoke another workflow?" section.The addition of this new section is helpful for users looking to invoke workflows programmatically. The two methods mentioned are valid and the link to the "Trigger Workflow" action documentation is correct.
Consider providing more details or an example for the HTTP request method.
To make it easier for users to understand how to invoke a workflow using an HTTP request to a Pipedream HTTP webhook trigger, consider adding a brief code snippet showing the structure of the HTTP request. Alternatively, provide a link to the relevant documentation section that explains this in more detail.
Tools
LanguageTool
[uncategorized] ~67-~67: The official spelling of this programming framework is “Node.js”.
Context: ...ps/helper-functions) app. See more here. Another opti...(NODE_JS)
67-67: Fix the spelling of "Node.js" in the link text.The link text currently uses "nodejs" which doesn't match the official spelling of "Node.js". Update it to use the correct spelling.
-[See more here](/code/nodejs#invoke-another-workflow). +[See more here](/code/Node.js#invoke-another-workflow).Tools
LanguageTool
[uncategorized] ~67-~67: The official spelling of this programming framework is “Node.js”.
Context: ...ps/helper-functions) app. See more here. Another opti...(NODE_JS)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- docs-v2/pages/code/nodejs/index.mdx (1 hunks)
- docs-v2/pages/troubleshooting.mdx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- docs-v2/pages/code/nodejs/index.mdx
Additional context used
LanguageTool
docs-v2/pages/troubleshooting.mdx
[uncategorized] ~67-~67: The official spelling of this programming framework is “Node.js”.
Context: ...ps/helper-functions) app. See more here. Another opti...(NODE_JS)
WHY
Summary by CodeRabbit
New Features
Documentation