🎉 Pipedream raises $20M Series A 🎉
Read the blog post and TC Techcrunch article.
Random Element
@dylan
code:
data:privatelast updated:2 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 250,000+ developers using the Pipedream platform
steps.
trigger
HTTP API
Deploy to generate unique URL
This workflow runs on Pipedream's servers and is triggered by HTTP / Webhook requests.
steps.
return_random_element_from_array
Pass an array, and this action returns a random element from it.
params
Array

The array to retrieve a random element from

[0]:
array ·params.array
code
async params => {
1
2
3
}
4
const sample = require("lodash.sample")
this.randomElement = sample(params.array)
const sample = require("lodash.sample")
this.randomElement = sample(params.array)