Skip to content

Conversation

@andrewjschuang
Copy link
Contributor

@andrewjschuang andrewjschuang commented Sep 18, 2024

WHY

Summary by CodeRabbit

  • New Features

    • Introduced documentation on invoking another workflow within the Pipedream platform using Node.js.
    • Clarified that invoking workflows is not supported in Python steps, directing users to Node.js for this functionality.
    • Added a "Trigger Workflow" action in the Helper Functions app for code-free workflow invocation.
  • Documentation

    • Updated Node.js documentation with details on the new workflow invocation feature.
    • Added a note in Python documentation regarding the limitations of workflow invocation.
    • Included a new section in troubleshooting documentation on invoking another workflow and alternative methods.

@vercel
Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 20, 2024 7:58pm
pipedream ❌ Failed (Inspect) Sep 20, 2024 7:58pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
pipedream-docs ⬜️ Ignored (Inspect) Sep 20, 2024 7:58pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Sep 20, 2024 7:58pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 18, 2024

Walkthrough

The changes introduce documentation updates related to invoking workflows within the Pipedream platform. A new section describes how to use $.flow.trigger(workflowId, payload) in Node.js for workflow invocation, currently in alpha status. The Python documentation clarifies that this functionality is not available in Python steps, directing users to Node.js instead. Additionally, a troubleshooting section has been added to explain the "Trigger Workflow" action and alternative invocation methods.

Changes

Files Change Summary
docs-v2/pages/code/nodejs/index.mdx Added documentation for invoking another workflow using $.flow.trigger(workflowId, payload).
docs-v2/pages/code/python/index.mdx Added a note stating that invoking another workflow is not supported in Python steps, with a reference to Node.js.
docs-v2/pages/troubleshooting.mdx Added a section on invoking another workflow, detailing the "Trigger Workflow" action and HTTP webhook method.

Possibly related PRs

  • publish trigger workflow action #14027: The changes in this PR involve updates to the trigger-workflow action, which directly relates to the new documentation on invoking workflows using $.flow.trigger, as both pertain to triggering workflows within the Pipedream platform.

Poem

In the garden where workflows play,
A new trigger hops in, hip-hip-hooray!
Node.js leads the way with a hop and a skip,
While Python takes a pause, a gentle trip.
With each little change, our tools grow bright,
A dance of code under the moonlight! 🐇✨


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9d13c0c and 3c2cb8f.

Files selected for processing (1)
  • docs-v2/pages/code/nodejs/index.mdx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • docs-v2/pages/code/nodejs/index.mdx

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between c4eb189 and 53da03b.

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)


## 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

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 68c051b and 9d13c0c.

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)

@andrewjschuang andrewjschuang merged commit 1c1292b into master Oct 7, 2024
6 of 7 checks passed
@andrewjschuang andrewjschuang deleted the docs/flow-trigger branch October 7, 2024 18:04
@coderabbitai coderabbitai bot mentioned this pull request Nov 15, 2024
@coderabbitai coderabbitai bot mentioned this pull request Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants