Articles on: Tips & Tricks

Posting To Slack

Posting to Slack



Inside Campaign Calendars

Adding a quick Slack message to your campaigns is a great way of notifying your internal marketing team, management, or other stakeholders of important campaign steps. Let everyone know that the big email is going out, that a critical campaign tweet is going out that day, or to mark the start or end of a big omnichannel campaign. Simply drag and drop the Slack icon to the Calendar day you want, pick a time and message, and as long as the campaign is active, your Slack message will go out to the channel of your choosing at that time.





Inside Workflows as a Workflow Action
ActiveDEMAND workflows are super configurable and you can now fire Slack messages from within them. Here, the possibilities are endless:

Notify sales of leads
Notify the correct project team of a closed sale
Debug a complicated or low volume workflow: add a slack step so that you can be sure it’s doing what you wanted it to do

The Slack Message that is being posted can either be markdown text for minimal styling (using Slack's markdown specification) or using Slack's Block Kit format to create a more comprehensive post.

You can embed dynamic fields within the message to deliver the context of the workflow to the specified slack channel. Using Block Kit may seem a bit daunting, but Slack provides a nice Block Kit designer to help you with your designs.

Note: The Slack Block Kit design tool does not recognise ActiveDEMAND dynamic terms in reference to URL's. Thus for buttons, when specifying the URL, you will need to put a placeholder URL in the block kit code to avoid their builder flagging it as an error.

Example
Goal: Post a claimable lead notification to a sales channel

If you want this: Post a claimable lead notification to a sales channel
Slack View:




You will need to do this:

Slack Message Activity:

Remember to check off the This Message is in Block Format(json) to expose the Slack Black Definition



Block Kit Code:

{
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": "New ActiveDEMAND Lead",
        "emoji": true
      }
    },
    {
      "type": "section",
      "accessory": {
        "type": "image",
        "image_url": "https://assets.activedemand.com/content_images/126424/images/original/favicon.png",
        "alt_text": "AD Brand"
      },
      "text": {
        "type": "mrkdwn",
        "text": "A New Lead has been generated by our fine marketing folks. This is fresh out of the oven, get it while it is hot!"
      }
    },
    {
      "type": "divider"
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Name:*\n%CONTACT.FIRST_NAME% %CONTACT.LAST_NAME%"
        },
        {
          "type": "mrkdwn",
          "text": "*Company:*\n %CONTACT.ACCOUNT.BUSINESS_NAME[unknown]%"
        },
        {
          "type": "mrkdwn",
          "text": "*Classification:*\n [%CONTACT.ACCOUNT.CUSTOM_FIELDS(CUSTOM_65).FORMATTED_VALUE[unclassified]%]"
        },
        {
          "type": "mrkdwn",
          "text": "*Country:*\n %CONTACT.ADDRESS.COUNTRY%"
        }
      ]
    },
    {
      "type": "divider"
    },
    {
      "type": "context",
      "elements": [
        {
          "type": "mrkdwn",
          "text": "*Activity:*\n %CONTACT_HISTORY.HISTORY_TYPE%\n[%CONTACT_HISTORY.SUBMITTED_FORM.FORM.NAME%] "
        },
        {
          "type": "mrkdwn",
          "text": "*Email:* %CONTACT.EMAIL.EMAIL_ADDRESS% "
        },
        {
          "type": "mrkdwn",
          "text": "*Phone:* %CONTACT.PHONE.PHONE_NUMBER% "
        },
        {
          "type": "mrkdwn",
          "text": "*Addition Info:*\n%CONTACT.BIO% "
        }
      ]
    },
    {
      "type": "divider"
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "You like it? Claim It!"
      },
      "accessory": {
        "type": "button",
        "text": {
          "type": "plain_text",
          "text": "Claim",
          "emoji": true
        },
        "value": "click_me_123",
        "url": "%CONTACT.CLAIM_LINK%",
        "action_id": "button-action"
      }
    }
  ]
}

Updated on: 24/09/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!