Post message with file in discord but only if tweet has an image. If it doesn't have an image regular send message in discord

I’m currently running a workflow where by twitter search receives some results with an image (media) and some without. Depending on whether this post contains an image I want it to post either without one (send message) or with it (send message with file) to my discord.

Is there a way to add a filter or an other method that can allow me to do this?

Hi @eddiephillips

Yes! Absolutely.

You can either use the helper $.flow.exit("Workflow exited because...") in a Node.js code step, or you can use the Filter pre-built action to define an exit early condition.

Here’s a short video explaining how to use this: