You can use the other event types if you want to post to Slack before or after messages are sent on PubNub.ĭelete any code in the editor and replace it with a function to post to Slack: // FOR A PUBNUB SERVERLESS ENV. Set the event type to “On Request”, and set the path to “slack-post”. Next, click “Functions” in the sidebar and then create a new module named “Slack Incoming Webhook.”Ĭreate a Function with the name “Slack Incoming Webhook.” Then click on the keyset that was created for that app. Go to your PubNub Admin Dashboard and select your app. Setting up a Slack Incoming Webhook Function Once you sign up, you can get your unique PubNub keys from the PubNub Admin Dashboard. You’ll need to sign up for a PubNub account.Configure the Incoming Webhook settings to your preferences. Follow Slack’s documentation for creating an Incoming Webhook.You’ll need a Slack account and a workspace.PubNub operates points of presence across the globe.Ĭheck out the Slack Incoming Webhook Block for a faster way to get started. Reduced Latency: Your users are global.Decreased Time to Market: Focus on building your product and not managing the infrastructure to support it.Reduced Cost: Pay for what you use and not for idle servers.Functions are JavaScript event handlers that can be executed on in-transit PubNub messages or in the request/response style of a RESTful API over HTTPS. What are Functions?įunctions is a serverless environment for executing functions. You can also use Incoming Webhooks to ask if a user has permission for a resource with the ability to respond from Slack. You can use Incoming Webhooks to send an alert when a user has paid, an error occurred, or if a service isn’t responding. Using Incoming Webhooks, you can create notifications or alerts and even make them interactive. This tutorial explains how to post messages to Slack from a Function using Slack Incoming Webhooks. I have opened a ticket to Slack support asking if Slacks Incoming Webhook message supports table of any form (HTML or Markdown).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |