Trouble Finding Message in Slack to Push to Notion

Extremely new to all of this and I feel like I must be misunderstanding how to correctly architect my workflow as I’ve seen how to accomplish this on Youtube with other platforms and it seems straight forward.

Goal is to insert a message into Notion page when a specific emoji is used. I’ve gotten it to trigger the event for the slack page I am monitoring but the fields presented don’t have the message body text. I created a new workflow item to “Find Message” in Slack and I am unable to insert multiple query parameters to look for messages in channel with emoji icon by my user. I can only search by one parameter at a time. Maybe the filter function is a better use case?

This is the concept I am trying to achieve

Would somebody be able to point me in the right direction?

Hi @brianavrit

First off, welcome to the Pipedream community. Happy to have you!

I can see how that’s confusing, I’m not certain why the message text isn’t included in the trigger data. I made a bug report here:

But in the meantime here’s a short tutorial on how to retrieve the message text itself in Pipedream:

Here’s the code I used in the video. You can just copy and paste this into a Node.js code step in your workflow:

import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    slack: {
      type: "app",
      app: "slack",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://slack.com/api/conversations.history`,
      headers: {
        Authorization: `Bearer ${this.slack.$auth.oauth_access_token}`,
      },
      params: {
        "channel": "REPLACE WITH YOUR CHANNEL ID",
        "latest": steps.trigger.event.event_ts,
        "limit": 1,
        "inclusive": true
      }
    })
  },
})

I hope this helps!

Thanks for the response Pierce! This cleared up a lot of questions I had while teaching me something new about the platform