Hello, World Workflow
@dylburger
code:
data:privatelast updated:3 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 800,000+ developers using the Pipedream platform
steps.
trigger
HTTP
steps.
get_first_name
auth
to use OAuth tokens and API keys in code via theauths object
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.
async (event, steps) => {
1
2
3
4
5
6
7
8
9
10
11
12
}
13
// I can require any npm package in code steps
const expect = require("expect")
expect(event.body).toHaveProperty('name')

// The event data (here, the HTTP request) is in the variable 'event'.
// console.log messages and other standard output appears below the step
console.log(`My name is ${event.body.name}`)

// Saving data to properties of 'this' exports the data for use in
// steps below. See https://docs.pipedream.com/workflows/steps/#step-exports
this.firstName = event.body.name.split(/\s+/)[0]
steps.
print_first_name
auth
to use OAuth tokens and API keys in code via theauths object
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.
async (event, steps) => {
1
2
3
4
}
5
// You can reference the first name we exported from the step above
// here. In general you reference data using 'steps.STEP_NAME.PROPERTY_NAME'
console.log(`I can reference the first name from the last step: ${steps.get_first_name.firstName}`)
steps.
email_me
Customize and send an email to the email address you registered with Pipedream. The email will be sent by notifications@pipedream.com.
params
Subject
Hi, my name is {{steps.get_first_name.firstName}}
string ·params.subject
Text
Nice to meet you
string ·params.text
Optional
code
async params => {
1
2
3
4
5
6
7
8
9
}
10
const options = {
  subject: params.subject,
  text: params.text,
}
if (params.html) {
  options.html = params.html
}
$send.email(options)