This is the simplest of our templates. Besides the trigger, there are only 2 components: An Emblem service that allows you to request the balance of any supported cryptocurrency from an address you specify, and then an SMS service that sends a text message with data from the previous component.



How it works

The Trigger component is used in this case as a manual trigger. By clicking the little white square on the bottom of the component, you can execute the circuit.


Next us the Emblem Get Coin Balance By Address component. Using an Emblem service API, it will retrieve the balance of any supported cyrptocurrency from the address you specify.


Note that this component asks you to enter an asset, coin, and an address. This is because there are many assets that live on the same blockchain, and so share address format with each other. The best example is Ethereum. Your Ethereum addresses can handle Ethereum, and also Cryptokitties, and also all of the ERC-20 tokens, such as Coval and the notorious Tether (USDT). 


Finally, we have a component that sends an SMS text. It sends the balance (and the address) to the phone number you specify.  Pretty simple, huh?


Note that for this template to run fully, you need to double-click the Send SMS component and enter a phone number. It would be silly if you sent ME a text every time someone played with this template, right??


But let's look at what we can learn from this example.


First, you were just able to call out to a cryptocurrency address and ask for a balance without writing a single line of code. Drag, drop, and enter information into text fields, like any web site.  


In the SMS component, we learn that we can pull data in from previous components in the flow. In our example, we are able to use the required syntax to pull the address and balance data from the previous node and include them in our text message.


All of the plain text goes into the message as written. But to include data from a previous component, we use these curly braces: {}. You can read more detail about this in this Knowledge Base Article about Using a Component's Response Data.


This is too simple! I want more of a challenge!

This is, in fact, the simplest template we have. Moving on, you can try the Emblem Vault Email Backup Template or the BTC Alert Template.


Even better, though, did you know that you can VERY EASILY turn this template into a monitor that watches an address and lets you know if there is any change to the balance at that address? If you want to try it yourself, then go on about your bad self! Need more help? Peek below.



SPOILER ALERT

Here is how you can modify this template to become a balance change notifier:


Add a "Modified" component (found in the "Common" group) after the Get Coin Balance by Address node, AND replace the Trigger with a "Timer" component (found in the "Time" group). Make the Timer 120000 for every 2 minutes. Change the SMS message if you wish, also!