Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@pipedream/helper_functions

Package Overview
Dependencies
Maintainers
9
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pipedream/helper_functions - npm Package Compare versions

Comparing version
0.4.1
to
0.4.2
+41
actions/trigger-wo...-for-each/trigger-workflow-for-each.mjs
import helperFunctions from "../../helper_functions.app.mjs";
export default {
key: "helper_functions-trigger-workflow-for-each",
name: "Trigger Workflow For Each",
description: "Trigger another Pipedream workflow in your workspace for each object in an array.",
version: "0.0.1",
type: "action",
props: {
helperFunctions,
workflowId: {
type: "string",
label: "Workflow ID",
description: "The ID of the workflow to trigger. Workflow IDs are formatted as `p_******` and you can find a workflow's ID within the workflow builder URL.",
},
objects: {
type: "any",
label: "Array of Objects",
description: "Use a custom expression (`{{steps.code.objects}}`) to reference an array of objects exported from a previous step to send to the triggered workflow.",
},
},
async run({ $ }) {
const {
workflowId,
objects,
} = this;
try {
const results = [];
const triggerPromises = objects.map((object) => $.flow.trigger(workflowId, object));
for await (const result of triggerPromises) {
results.push(result);
}
$.export("$summary", `Successfully triggered workflow ID **${workflowId}**`);
return results;
} catch (error) {
$.export("$summary", `Failed to trigger workflow ID **${workflowId}**.`);
throw error;
}
},
};
+1
-1
{
"name": "@pipedream/helper_functions",
"version": "0.4.1",
"version": "0.4.2",
"description": "Pipedream Helper_functions Components",

@@ -5,0 +5,0 @@ "main": "helper_functions.app.mjs",