Skip to content

Flow Examples

Arie J. Godschalk edited this page Nov 18, 2026 · 5 revisions

Home / Flows

Flow examples

Use Homey's Advanced Flow editor and a manual Start for tests. Save before running. Text in code is an example you can enter; insert named tokens using Homey's token picker.

Play an announcement

Before you start: set up Text-to-Speech and a speaker with a Homey action that accepts an audio URL. For cloud speech the speaker must reach Homey on port 47333 and support your encoding (MP3 by default).

Cloud speech action sends its Url token directly to the speaker's URL field

Illustration: connect the speech action's Url output, not the Text token, to your player's URL input.

  1. Connect Start to Start TTS with voice at speed with pitch (with tokens). Enter Dinner is ready. Choose an English voice, set Speed to 1 and Pitch to 0; leave device pitch at 0 too.
  2. Connect the successful output to your speaker's play-URL action. Put the speech action's Url token in the player's URL argument.
  3. Add a private failure notification on the speech action's error path. Save and run: you should hear the sentence. Duration is audio length in milliseconds, not a playback acknowledgment. If the Flow succeeds but there is no sound, check the player and URL.

For regular Flows or waiting conditions, make one enabled Flow with Url triggered for the same speech device, passing its Url token to the player. A different Flow can then run Start TTS. Choose either this trigger route or the direct token connection for the same player; cloud token actions also fire the trigger. For Non-Cloud speech use its own Start TTS action or Url triggered card and a short text up to 200 characters.

This follows the app author's announcement tutorial. Edgar's Advanced Flow routes announcements by room with sensors and variables; Google Services doesn't determine your room.

Play on a supported Homey speaker

Use Music Url Converter only on Homey models with supported speaker playback. With the setup above, connect the speech action's Url token to Music Url Converter's Play URL action, URL field. If using the trigger route instead, use that trigger's Url, not both routes. Test with Dinner is ready. in MP3. The converter's action completion does not confirm the speaker finished.

Google speech Url token goes to Music Url Converter Play URL

Illustration: the converter is the player for this setup; Google Services still only produces the URL.

Play a sound before speech

Before you start: make the announcement work, set the default cloud voice, and set up Universal Media Player with a UPnP server (a server that shares media on your network). Put a short, known two-second MP3 such as chime.mp3 on that server. Use the player that already plays your announcements.

Chime action Url goes to the player, then a short delay leads to the speech action

Illustration: the chime and speech each supply their own Url. The delay is not playback feedback.

  1. Start with Universal Media Player's Play a UPnP file action that returns tokens. Select your chime in File and leave Finish off. Use the action's Url in the speaker action's URL field, not a separate UPnP URL trigger.
  2. On the speaker action's success path, add a four-second delay before the speech action with tokens above. Enter Dinner is ready. Use its Url in a second speaker action. Connect errors to a notification, not to the next audio action.
  3. Save and run. Expect the chime, then the sentence. Allow more time if they overlap or the chime starts late. Prefer actual playback completion from the player if it provides it.

For two spoken messages with an enabled trigger-based player Flow, use two Start saying Text and finish conditions chained from the first condition's true path to the next, with Text Dinner is ready. and Please come to the table. The conditions wait for the generated duration plus the device's delay, not for feedback from the speaker. Another speech request to the same device can replace the pending timer. See the Advanced Triggers discussion and optional sequencing; Google Services does not queue independent requests.

Two waiting speech conditions connected by the first condition's true path; both send audio through a separate Url triggered Flow

Illustration: chain the conditions by their true path, not by URL tokens. The separate trigger passes each Url to the player.

Translate a message

Before you start: configure the Cloud Translation JSON and project ID, and add Google Translate.

Translate action passes its Translation token to a notification

Illustration: the Translation token is the translated sentence; Text to translate is the input.

  1. Connect Start to Translate (with tokens). Enter Hello, choose English (en) under Source Language and Dutch (nl) under Target Language.
  2. Connect the success path to a notification. Insert Translation in the message. Connect the error path to a separate translation failure message.
  3. Save and run. Expect a Dutch translation, typically “Hallo”. If suggestions are empty, check translation troubleshooting.

Search YouTube

Before you start: enable YouTube Data API v3, save a YouTube API key and add YouTube.

YouTube search passes its YouTube link token to a notification

Illustration: use YouTube link for a clickable video URL; it is not an audio URL for a speech player.

  1. Connect Start to Search within YouTube (with tokens). Enter Homey smart home.
  2. Connect success to a notification with YouTube link in its message. Add a separate error notification for no result, invalid key or quota issues.
  3. Save and run. Expect a link to the first video in this search; results vary. The action also fires YouTube triggered. Use one result path per notification to avoid duplicates.

Combine translation and speech

Before you start: make the translation and cloud announcement above work.

Translation output goes into speech Text, then the speech Url goes into the player URL

Illustration: connect Translation to Text first, then connect Url to the player.

  1. Keep the Translate (with tokens) action and its Hello, English → Dutch inputs. On success, connect to the cloud speech action with tokens.
  2. Insert Translation into the speech card's Text. Select a Dutch voice, Speed 1 and Pitch 0 (also 0 on the device). Connect success to the speaker action with Url in its URL field.
  3. Connect both error paths to notifications, not the speaker. Save and run. Expect the player to speak the Dutch translation. Don't also route the trigger to the same speaker.

To add the current time or another expression to Text, see BLL coding. For a trip estimate, go to Maps examples.

Clone this wiki locally