This topic was automatically generated from Slack. You can find the original thread here.
is there a way to trigger a workflow from another workflow?
This topic was automatically generated from Slack. You can find the original thread here.
is there a way to trigger a workflow from another workflow?
Yes, you can trigger a workflow from another workflow in Pipedream! There are a few ways to do this, depending on your needs: — ## 1. Using $.flow.trigger in a Code Step You can invoke another workflow directly from a Node.js code step using the $.flow.trigger method: await $.flow.trigger( "p_abc123", // Replace with your target workflow's ID { key: "value" } // Any JSON-serializable payload ) - This method does not require configuring a trigger on the target workflow, and the invocation stays within Pipedream. - Find your workflow’s ID here. — ## 2. Using the “Trigger Workflow” Action Pipedream provides a pre-built Trigger Workflow action in the Helper Functions app. You can add this action to your workflow and configure it to trigger another workflow in your workspace. — ## 3. Using HTTP Requests If your target workflow uses an HTTP/Webhook trigger, you can make an HTTP request to its unique URL from your source workflow (using a code step or an HTTP action). — ## 4. Emitting Events Between Workflows You can also emit events from one workflow and have another workflow listen for those events. This is useful for chaining workflows or centralizing logic. - Use $.send.emit() in your emitter workflow: export default defineComponent({ async run({ steps, $ }) { $.send.emit({ name: "Yoda" }); } }); - Set up your listener workflow to receive these events (see full instructions). — Summary: You can trigger a workflow from another workflow using $.flow.trigger, the “Trigger Workflow” action, HTTP requests, or event emission. Choose the method that best fits your use case! If you need more details or help with a specific method, let me know!
i’m getting **PD Connect Error** Running workflows with official OAuth apps is not allowed
I’m sorry you’re running into this error. The message: ```
PD Connect Error Running workflows with official OAuth apps is not allowed