Git Product home page Git Product logo

slack-salesforce's Introduction

Integrate Slack and Salesforce in 20 mins! ๐Ÿ’ฌ๐ŸŒฉ๏ธ๐ŸŒ

Presented at VirtualDreamin'20

Recording-_331

๐Ÿ“บ Walkthrough

  1. Slide Deck - https://docs.google.com/presentation/d/1Qsz_CFvs-1qHIRwkMjlp_7vP8ynY7blh/edit#slide=id.p1
  2. Video Walkthrough - Coming Soon!
  3. Q & A - Coming Soon!

๐Ÿ› ๏ธ How is this done (5 simple steps!)?

This is achieved using the new Workflow Builder feature in Slack and External Services in Salesforce. Here are the steps in brief:

  1. Using the Slack Workflow Builder, create and publish a Workflow that post messages into a Slack Channel and is triggered by a Webhook. Read for more info: https://slack.com/intl/en-in/help/articles/360035692513-Guide-to-Workflow-Builder.

  2. Construct a Swagger Schema for the Webhook provided by Slack (in Step 1). Use the Template given below to get started.

  3. Created a Named Credential in Salesforce with URL - https://hooks.slack.com. (No Auth)

  4. Import the Swagger Schema constructed in Step 2 using External Services.

  5. Create a Flow as shown below: image

๐Ÿ“‹ Template Swagger Schema

{
  "swagger": "2.0",
  "info": {
    "title": "Slack + Salesforce",
    "description": "Instantly Send Messages to Slack from Salesforce",
    "version": "1.0.0"
  },
  "host": "hooks.slack.com",
  "schemes": [ "https" ],
  "paths": {
    "[REPLACE THIS WITH YOUR WEBHOOK]": {
      "post": {
        "consumes": [ "application/json" ],
        "parameters": [
          {
            "in": "body",
            "name": "slackMessageRequest",
            "type": "object",
            "required": true,
            "schema" : {
              "$ref" : "#/definitions/SlackMessageRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation"
          }
        }
      }
    }
  },
  "definitions": {
    "SlackMessageRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        }
      }
    }
  }
}

โš ๏ธ Note: To validate a Swagger Schema (written by yourself), visit - http://editor.swagger.io/.

โš ๏ธ Note: Please DO NOT forget to replace [REPLACE THIS WITH YOUR WEBHOOK] in the above Template Swagger Schema with the Webhook of your Slack Workflow.

๐Ÿ”— Resources

  1. Trailhead https://trailhead.salesforce.com/en/content/learn/modules/external-services
  2. Blogs https://shrutisridharan.wordpress.com/tag/external-services/

slack-salesforce's People

Contributors

shrutis22 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.