Fan out HTTP body to multiple webhooks
@pravin
code:
data:privatelast updated:4 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 API
Deploy to generate unique URL
This workflow runs on Pipedream's servers and is triggered by HTTP / Webhook requests.
steps.
send_http_request_1
Send data to an HTTP destination.
params
Url
 
string ·params.url
Payload
{{event.body}}
string ·params.payload
Optional
code
async params => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
}
28
const axios = require("axios")
const config = {
  method: params.method ||  "post",
  url: params.url,
}
for (const { key, value } of params.query || []) {
  if (!config.params) config.params = {}
  config.params[key] = value
}
for (const { key, value } of params.headers || []) {
  if (!config.headers) config.headers = {}
  config.headers[key] = value
}
if (params.auth) {
  config.auth = {
    username: params.auth.username,
    password: params.auth.password,
  }
}
if (params.payload)  config.data = params.payload
try {
  return await axios(config)
} catch (err) {
  this.err = err
  throw err
}
steps.
send_http_request_2
Send data to an HTTP destination.
params
Url
 
string ·params.url
Payload
{{event.body}}
string ·params.payload
Optional
code
async params => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
}
28
const axios = require("axios")
const config = {
  method: params.method ||  "post",
  url: params.url,
}
for (const { key, value } of params.query || []) {
  if (!config.params) config.params = {}
  config.params[key] = value
}
for (const { key, value } of params.headers || []) {
  if (!config.headers) config.headers = {}
  config.headers[key] = value
}
if (params.auth) {
  config.auth = {
    username: params.auth.username,
    password: params.auth.password,
  }
}
if (params.payload)  config.data = params.payload
try {
  return await axios(config)
} catch (err) {
  this.err = err
  throw err
}
steps.
send_http_request_3
Send data to an HTTP destination.
params
Url
 
string ·params.url
Payload
{{event.body}}
string ·params.payload
Optional
code
async params => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
}
28
const axios = require("axios")
const config = {
  method: params.method ||  "post",
  url: params.url,
}
for (const { key, value } of params.query || []) {
  if (!config.params) config.params = {}
  config.params[key] = value
}
for (const { key, value } of params.headers || []) {
  if (!config.headers) config.headers = {}
  config.headers[key] = value
}
if (params.auth) {
  config.auth = {
    username: params.auth.username,
    password: params.auth.password,
  }
}
if (params.payload)  config.data = params.payload
try {
  return await axios(config)
} catch (err) {
  this.err = err
  throw err
}