This workflow retrieves the latest position of the ISS) and posts the location to https://twitter.com/whereistheiss. It uses the HTTP/Webhook action to retrieve data from the Open Notify API, then transforms the data into a human readable message using Open Cage Data and Twitter actions, Node.js code steps and the moment.js npm package.
In this workflow, we'll:
Get the latest position of the International Space Station (ISS) using the Open Notify API. This API doesn't require authentication so we can use Pipedream's HTTP/Webhook action to make a simple GET
request.
Next, we'll use an action for Open Cage Data to get the approximate location on Earth the ISS is passing over. To do that, we'll use the pre-built action so we don't have to write any code. We just need to connect our Open Cage Data account and pass the latitude and longitude returned in the previous step to the action.
Next we'll construct a human readable summary of the ISS position using the point on Earth identified by Open Cage Data and the moment.js
npm package (to convert the timestamp returned by the Open Notify API into a human readable date/time). We'll also include a URL to view the ISS position on Google Maps.
Finally, we'll use an action to post a Tweet to https://twitter.com/whereistheiss. To use post the Tweet, we just need to connect our Twitter account and pass the return value of steps.iss_summary
as the Tweet content.