Skip to main content
Question

How to filter messages in Discord channels

  • November 17, 2024
  • 10 replies
  • 292 views

Hello everyone! I`m new to zapier and would like some help.

 

So, I have a tf2 trade bot which trade items and send a message in a discord channel with what was traded away with a summary of the trade, here is an example:

And I want to get these messages and put them in a excel!

 

My questions are:

 

1 - How can I filter the message to catch only the asked and offered part of it? Since the values of “ref” are always changing, so is the name of the items in parenthesis

 

2-Is it possible to filter so that when is ASKED the item Refined Metal in parenthesis zapier will put in a different role? Or will I have to do 2 zaps for that?

 

 Keep in mind that all trades that my bot does they have this same pattern, only changing some things

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

10 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • November 17, 2024

Hi ​@Baianic 

Help link for using a Filter step: https://zapier.com/apps/filter/help

Help links for using Formatter Zap app: https://zapier.com/apps/formatter/help

Resources for email parsing that can also be used for text parsing:

 


  • Author
  • New
  • November 18, 2024

Heya! Thanks for the help! I’m having another problem now tho

 

Why is this filter not working?

 

This is the message I’m trying to filter 

Everything seems alright to me, could someone help me out?


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • November 18, 2024

Hi there ​@Baianic,

It looks like you’re using the incorrect data in the last field of the filter step. Could you please try only typing Asked: Refined Metal. You can learn more about filter rule types here: https://help.zapier.com/hc/en-us/articles/8496180919949-Filter-and-path-rules-in-Zaps

Kindly give it a try and let me know how it goes? I'll keep an eye out for your response!

 


  • Author
  • New
  • November 18, 2024

Heya! Thanks for the answer!

 

I tried how you sended it and the error still remains:

 

 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • November 18, 2024

@Baianic 

The Filter step warning indicates the Zap step 1 example data would not meet the Filter step conditions.

Post screenshots of the raw Embeds Description returned from Discord in Zap step 1 for us to have true context.

 


  • Author
  • New
  • November 18, 2024

This is the raw embed description

 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • November 18, 2024

@Baianic 

The Filter condition would need to match the format of the data coming from Discord.

You may have to add a Formatter or Code step before the Filter step to be able to parse out the desired data points to then use in the Filter condition.

 


  • Author
  • New
  • November 18, 2024

What would be the best option to use in this case? I tried using the formatter but couldnt get it to work!


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • November 18, 2024

@Baianic 

As an example, check the screenshots, you would need to have the Filter step condition values match for the expected values.

Zapier Filter step conditions do not support regex for dynamic matching.

**. Asked:** 6.11 ref ([Scrap Metal]

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • November 29, 2024

Hey ​@Baianic 👋 

Did you get the filter working in the end? 

If not, it looks like you’d need to adjust the value in the filter as it actually comes through from Discord as [Refined Metal]:

a89096d8a74b6c23c3e094dbfce5287d.png

So in the Filter you’d need to use [Refined Metal] instead of Asked: Refined Metal. Like so:

64a0f58c34800f42568a2bf37559511a.png

That should allow it to pick up the presence of [Refined Metal] mentioned anywhere within that Embeds Description field.

Hope that helps. Keen to ensure you’re all set here so please keep us updated on how things are going! 🙂