Using the type of message sent by a user as a trigger

Hasan Tariq Updated by Hasan Tariq

Sometimes you may want to start a journey when a user sends a media file (video, audio, or image) instead of a text message. Here's how you can set it up in Turn:

This is possible within Turn by using the following steps:

  1. Create a New Trigger
    1. Choose "When a message is received".
    2. Then you select "The message is".
  2. Enable Advanced Filtering
    1. Toggle on the "Advanced Filtering" option to allow custom conditions.
  3. Define the Trigger Condition
    1. For example, if you want to trigger the journey when a user (who isn’t already in a journey) sends an image or a video, use the following code
      event.message.type == "image" or event.message.type == "video"
  4. Save Your Journey
    1. Once saved, this journey will trigger whenever a user sends in an image or a video.

Available Options for type in event.message.[type]

  • text
  • image
  • video
  • audio

Was this article helpful?

Overview of the Turn.io user interface

Contact