Slack nodes for KNIME

Yes, URL to an image and need for both channel and user nodes.

@raghum I have updated the dialogs for the nodes sending messages to channels and users to have an advanced tab.

The advanced tab has the settings for specifying the username, icon url and icon emoji.

image

Example output:

image

They are all disabled by default.

This feature will appear as version 2.4.0 once it has finished building. It’s building now for the nightly/trunk so you should be able to test it shortly. However, there appears to be an issue with the 4.1 release build that’s out of my control so I’m not sure whether this will build tonight.

Cheers

Sam

Perfect, Thanks a lot. Will test it tomorrow then.

It should now be available in the 4.1 release update site.

For me, ICON emoji is working but not ICON URL. I guess, chat:write:customize scope is sufficient for both of them right?

Yes I belive so.

Can you try change the name of the bot and see if it works? I found doing one (emoji) then the other (icon url) didn’t update the image unless I also changed the bot name due to the way slack groups the messages.

If that doesn’t work I’ll do some investigating.

Yes, it works if I change the name of the bot.

Can we change the Flow variables type from Boolean to Int/String as I can’t pass Flow variable as Boolean?

Are you talking about controlling whether to overide the bot name or icon with flow variables?

You can pass in a string value of true or false and it should work.

image

Got it. URL/emoji is working for User node but not for Channel node. Set Username option is also not working for Channel node and it doesn’t have Fail on error option.

Oh dear, we’ve hit another ‘works for me not for you’ scenario.

image

image

Do you get an error message or is it just not changing the name/icon? Does it work if you use the tester on the slack api page? https://api.slack.com/methods/chat.postMessage/test

Fail on error has never been a setting on the message channel nodes. For now you can wrap them in a try catch. I’ll add the ability to continue on errors to the Message Slack channel node. The Message Slack channel (row based) should already handle errors in a similar way giving a missing timestamp for failed messages.

Its not throwing any error and It is working through test API.

Sorry, its working now.

Glad to hear it. I’ll let you know when the send channel message node has the option for fail on error.

Hi Sam, I am not able to send messages to Private channels though the app is part of the channel. I am getting not a valid channel error.

Could you please look into this?

1 Like

Ah that’s not good.

Did anything change between when it did won’t and now?

I’ll have a look and see if there’s any API changes I need to handle.

If you’re seeing any more detailed error messages in the log or get any errors displayed in a node warning please let me know what they are.

Cheers

Sam

No changes are done. May be, I haven’t tested for private channel.

I dont see much information from logs.

However, I am able to send message to private channels through API.

To confirm:

Using the API tester (https://api.slack.com/methods/chat.postMessage/test) configured with the same token and channel name it works:

e.g.

But when done in the KNIME node it fails?

I just tested this on my workspace and I have success both on the API test and the KNIME node.

Does the node show up int he table generated by the Get Channels node?

The error would imply that your bot token doesn’t have permission to access that private channel, there’s a typo in the channel name (do you have an accidental space after the name?) or there’s a bug in the code. It would be good to double check and rule out the first two options before I spend time debugging.

Cheers

Sam

Well, I dont see private channels under Get Channels node either.

But it does work in the api tester?

Not seeing it in the get channels sounds like you haven’t actually got the bot in the channel or the some tokens are missing. Though I would expect this to fail everywhere not just using it in knime.

It works through API Tester but not through KNIME nodes.