The best new products in tech
Run any Bash in a Pipedream step within your workflow. Refer to the Pipedream Bash docs to learn more.
The Product Hunt API taps into a vibrant community of tech enthusiasts and makers, allowing you to interact with their platform programmatically. With it, you can retrieve details on the latest trending products, post comments, and gather user data. Automating these interactions can keep you informed on tech trends, engage with the community, and analyze market interests.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
product_hunt: {
type: "app",
app: "product_hunt",
}
},
async run({steps, $}) {
const data = {
"query": `{
viewer {
user {
id
username
}
}
}`,
}
return await axios($, {
method: "post",
url: `https://api.producthunt.com/v2/api/graphql`,
headers: {
Authorization: `Bearer ${this.product_hunt.$auth.oauth_access_token}`,
},
data,
})
},
})
# $PIPEDREAM_STEPS file contains data from previous steps
cat $PIPEDREAM_STEPS | jq .trigger.context.id
# Write data to $PIPEDREAM_EXPORTS to return it from the step
# Exports must be written as key=value
echo foo=bar >> $PIPEDREAM_EXPORTS