Locate the International Space Station
@tod
code:
data:privatelast updated:5 years agoarchived
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 1,000,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.
nodejs
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
// Click SEND TEST EVENT and then select the event above to inspect it
// The code on this page is fully editable and is run on our servers
console.log(`Let's see where the ISS is with Node ${process.version}`)
steps.
nodejs_1
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
// We can use any package from NPM -- just 'require' it 
const axios = require("axios")

// And we can use ES8 async/await to pull the ISS's position from the open API
const result = await axios.get("http://api.open-notify.org/iss-now.json")

// Let's save the data on the ISS's position to $event so we can reference it in the next code cell
$event.iss_position = result.data.iss_position
steps.
nodejs_2
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
// Now let's generate a URL to visualize the ISS position in Google Maps
console.log(`View ISS Position on Google Maps at https://maps.google.com/?q=${$event.iss_position.latitude},${$event.iss_position.longitude}&ll=${$event.iss_position.latitude},${$event.iss_position.longitude}&z=3`)

// Next, try customizing the script and automating it to run on a schedule or based on a webhook/HTTP request for free