The flow code has 7 tasks:
- Take true or false as input from the user to get an invite for the Slack workspace
- If the user selects true, ask their name ( optional )
- Get the user's IP Address using the ipify api
- Use the IP Address to know the city the user is in and the ISP of the user using the ipinfo api
- Provide the latest weather description along with temperature, humidity, and UV index as the Output using the weatherstack api
- Query the data and provide the output in a paragraph with the needed information
- Send the output as a welcoming message to the Slack workspace
- It utilises Switch cases for conditional logic
- It uses the Jsonata plugin to transform and query the JSON data received from the api request.
- It uses the Slack-notification plugin to send a message in the workspace after the task is successfully run.
The purpose of the flow is to demonstrate the dynamic workflow orchestration capabilities of Kestra for an ETL (Extract, Transform, Load) pipeline use case.
You can join the Dummy Workspace to view the messages. Here is the invite Link
Resources:
- https://www.ipify.org/
- https://ipinfo.io/dashboard/ (Get your key)
- https://weatherstack.com/dashboard (Get your key)
- https://api.slack.com/ (Get your key)
- https://kestra.io/docs
- https://docs.jsonata.org/overview.html
Disclaimer: The APIs used are under the free tier subscription, so if you run the flow with VPN enabled or with Proxy, it will provide inaccurate data.
The code has the necessary API Keys in the Docker Compose file for easy testing purposes. Users can replace them with their own.
Prerequisites: None!
- Copy compose.yaml and build the service
- Start the Kestra Server
- Copy Kestraflow.yaml
- Save the file and then execute.
- The flow will ask for your response
- If yes, then give your name as an input (optional)
- Once the flow is done, head over to the output section to get the invite link for the workspace, you will find the link in
invitelink
task - In the workspace, you will receive a custom welcoming message.
Prerequisites:
4769- ipify api
no key
- IPInfo access key
- Weatherstack access key
- Slack workspace with required access
- Slack incoming webhook access key
- Docker compose file downloaded
- Kestra is installed and running
The project is made during the #KestraHackWeek