There’s now a new bot trigger - New File. You won’t be surprised to hear that it fires every time a user sends a file to your bot, or when a file is uploaded to any channel that the bot has been invited to.
It has a similar set of outputs to New Message, including Message Type and Message, as on some platforms it’s possible to send a message containing both text and an attachment. The message won’t always be present on this trigger.
The extra outputs for New File are File Type and File URL. File type can be one of:
The file URL is the location of the file given to us by the platform. This is not always suitable for sharing publicly so be careful that it doesn’t contain any credentials. If you want to share it publicly it’s usually best to place the file somewhere else before sharing that.
If more than one file is sent, the trigger will fire separately for each file.
This feature is supported on Messenger and Slack currently, not Telegram.