Preparing External Services
Some settings need a key or value issued by an external service. Here is how to obtain each of them.
| Service | Values to enter in Grablo | Used by |
|---|---|---|
| Google Cloud | API key | Text-to-Speech, Speech-to-Text |
| OpenAI | API key | Text-to-Speech, Speech-to-Text, LLM AI |
| ElevenLabs | API key, Voice ID | Text-to-Speech |
| Telegram | Bot token, chat ID | Telegram Bot setting, Telegram Message action |
| Firebase | Database address, web API key, login account | Database |
| SoundFont | Bank and preset numbers | Synthesizer action |
Google Cloud (TTS and STT)
- Sign in to Google Cloud and click Console at the top right. Create a new project from the project selector at the top, and attach a payment method to it under Billing.
- Under APIs & Services, find and enable both Text-to-Speech API and Speech-to-Text API.Searching for text to speech and speech to text finds them.
- In APIs & Services > Credentials, choose + Create credentials → API key and copy the value.
- On the same screen, restrict the key to those two APIs.An unrestricted key can be used by every application and API in the project. Restricting it limits the damage if the key leaks.
OpenAI
- Sign in to the OpenAI platform (platform.openai.com), click + Create new secret key → Create secret key under Dashboard > API keys, and copy the value with Copy.The key value is shown only once when it is created, so copy it right away.
- Add a payment method and top up your balance under Settings > Billing > Payment methods.OpenAI's speech conversion has no free allowance, so a balance is required.
ElevenLabs
- Sign up on the ElevenLabs website, then open your account name at the bottom left and click API Keys → Create Key. Leave the name at its default, click Create, and copy the key value shown.
- In Voices, preview the voice you want, then click View → ID to copy its Voice ID.The API key alone does not complete the setting; the Voice ID is required too.
Telegram Bot
- Find
BotFatherin Telegram, start the chat with START, and send/newbot. - Enter a display name for the bot, then a username.The username must end in bot and must not collide with another bot.
- Enter the issued token in Settings → Telegram Bot.
- Open the new bot's link to start a chat and press START.Without this step the bot cannot send you messages.
- Find
@userinfobotin Telegram and start it to learn your chat ID. Enter that value in Action → Telegram Message.A chat ID is the unique number identifying the user, group, or channel that receives messages.
Firebase Realtime Database
- Create a new project in the Firebase console (Go to console). Enter a project name and click Continue, turn Google Analytics off, and click Create project.
- Choose Realtime Database from the product list and click Create Database. Select a database location and click Next, then choose Start in locked mode for the security rules.
- Copy the database address shown at the top of the screen with the link button.
- Under Authentication → Sign-in method, enable the method you want. For email and password access, switch on Enable for Email/Password, click Save, and add accounts on the Users tab (several accounts can be added); for access without a login, enable Anonymous under Add new provider.The sign-in method can be changed at any time later with Edit configuration.
- Click the gear icon next to Project Overview → Project settings → General, and copy the web API key.The web API key is needed for the controller to connect to the Firebase database server.
- On the Rules tab of Realtime Database, delete the existing content, paste the rules below, and click Publish.A database created in locked mode is closed to everyone. These rules open it to the users you allowed above.
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
Choosing an Instrument from a SoundFont
The Synthesizer setting takes a SoundFont file plus the bank and preset numbers that identify an instrument. Those numbers come from a SoundFont editor. Open the SoundFont (sf2, sf3) in an editor such as Polyphone, select an instrument in the Presets list, check the sound with the virtual keyboard, and enter the bank and preset values shown at the bottom of the screen.
Polyphone is available from polyphone.io. Expand the preset list with the arrow button, and open the virtual keyboard with the piano key icon at the top right. The values are used by the Synthesizer action.
Fetching Weather Data
Grablo has no dedicated weather action, so a weather API is called with the HTTP Communication action. With WeatherAPI.com, for example, sign up, find the API key on the dashboard, and request the following.
https://api.weatherapi.com/v1/forecast.json?key=API_KEY&q=Seoul&days=3&lang=en
The general form is as follows.
https://api.weatherapi.com/v1/forecast.DATATYPE?key=API_KEY&q=LOCATION&days=DAYS&lang=LANGUAGE
| Item | Description |
|---|---|
| DATATYPE | json or xml |
key | The API key shown on the WeatherAPI dashboard |
q | A city name (e.g. Seoul, Busan, Incheon, Daegu, Daejeon, Gwangju, Ulsan, Jeju, London), a latitude and longitude (e.g. 37.5665,126.9780), or auto:ip |
days | Number of forecast days. The maximum available depends on your plan. |
lang | Response language (e.g. en English, ko Korean, ja Japanese) |
The values most often used from the response are below; extract them with the JSON blocks and store them in variables (Part 8).
| Path | Value |
|---|---|
location.name, location.region, location.country | Location name, region, country |
location.tz_id, location.localtime | Time zone, local time |
current.temp_c | Current temperature in Celsius |
current.humidity | Current humidity (%) |
current.is_day | 1 during the day, 0 at night |
current.wind_kph | Current wind speed (km/h) |
current.condition.text | Current conditions |
forecast.forecastday[].date | Forecast date |
forecast.forecastday[].day.maxtemp_c, mintemp_c | Daily high and low temperature |
forecast.forecastday[].day.daily_chance_of_rain | Daily chance of rain (%) |
forecast.forecastday[].day.condition.text | Daily conditions |
forecast.forecastday[].astro.sunrise, sunset | Sunrise and sunset times |
forecast.forecastday[].hour[] | Hourly forecast |