Skip to content

Instantly share code, notes, and snippets.

@nicolaschenet
Created March 13, 2021 16:13
Show Gist options
  • Save nicolaschenet/f79c381f6720e52425487bf8e61c1616 to your computer and use it in GitHub Desktop.
Save nicolaschenet/f79c381f6720e52425487bf8e61c1616 to your computer and use it in GitHub Desktop.
// Send update via Telegram
const res = await Promise.all(Object.keys(output?.exchanges).map(async exchangeCode => {
const exchange = output?.exchanges?.[exchangeCode]
await require("@pipedreamhq/platform").axios(this, {
method: 'POST',
url: `https://api.telegram.org/bot${auths.telegram_bot_api.token}/sendMessage`,
data: {
chat_id: steps.setup.$return_value.telegramChatID,
text: `Hey! I just updated your allocations on ${exchangeCode}, because the crypto weather just updated to ${exchange.weather} ;)`
}
})
}))
@nicolaschenet
Copy link
Author

I stored the weather in every exchange... should go directly in output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment