How to Install JS App on n8n cloud?


I’m new to n8n and have recently started using the free trial. I’m looking to set up a workflow where I can listen to Slack messages and react accordingly based on the input. I’ve successfully implemented this in Python, but now I’m trying to achieve the same in JavaScript within n8n. However, I’m encountering an error: “ERROR: Cannot find module ‘@slack/bolt’ [line 6].” Could you guide me on how to install the ‘@slack/bolt’ module in the n8n cloud host environment?

Please refer to the attached screenshot for more context.

Thank you.

Hi @Asuwini_P,

Welcome to the community :tada:

At the moment it is not possible to add node packages to n8n cloud that is an option that is only available when self hosting.

Looking at your code though our Slack node supports blockkit so you may be able to do whatever you are trying with just the standard slack node and a webhook workflow to manage the response.

Thanks for quick reply and clarified my doubts @Jon

Instead of writing the JS/python code for listening the Slack message, can we do it through the nodes (http/webhook) ? Could you please explain regarding that?

Hey @Asuwini_P,

It all depends on what it is you are actually to do but looking at your screenshot you appear to be sending a block with a button. In the Slack node you can set the Message Type to Blocks and that will take the same json syntax that you are trying to use although event.user would need to be tweaked.

If you were trying to do something with the Slack interactive endpoint or events api you can add a webhook node to your workflow which will give you a URL you can give your Slack app and from there it should get sent any messages for events you are interested in.

This is something we don’t have a guide for but the Slack docs are pretty good when it comes to sending events.

Thank you so much for your guidance @Jon , Using the Webhook node, I have completed the listing the Slack message part. Reference Link

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.