How Can I Filter Words and Send Them to Notion Database or Threads with a Telegram Bot?

This topic was automatically generated from Slack. You can find the original thread here.

Hello! I tried to create a workflow where my Telegram bot listens to all messages in a channel and when it sees certain words in the messages, it would send them to the Notion database or Threads.

However, I ran into a problem that I cannot figure out how to filter the words and how to specifically send these words to the Notion database or threads.

Maybe someone can help me or suggest something?

In your case I would recommend using a Python or a Node.js code step to handle the routing of messages to Notion databases.

For example you could use if statements and export which database the message should be routed to:

if(word.matches(/some regex pattern/) {
  $.export({
    word,
    database: 'Notion database ID here'
  });
}