web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Post Slack message as ...
Power Automate
Unanswered

Post Slack message as an attachment

(0) ShareShare
ReportReport
Posted on by 9

I am using a flow which simply posts a message to slack.

 

However I am wanting to post as an attachment which allows me to change the layout of the message and especially the color of verticle bar to be either danger, warning or good.

 

Is there a particular message format and parse option I need to select to be able to use attachments.

 

The info from the api documents says to use:

 

Test

{
 "attachments": [
 {
 "fallback": "Required plain-text summary of the attachment.",
 "color": "#2eb886",
 "pretext": "Optional text that appears above the attachment block",
 "author_name": "Bobby Tables",
 "author_link": "http://flickr.com/bobby/",
 "author_icon": "http://flickr.com/icons/bobby.jpg",
 "title": "Slack API Documentation",
 "title_link": "https://api.slack.com/",
 "text": "Optional text that appears within the attachment",
 "fields": [
 {
 "title": "Priority",
 "value": "High",
 "short": false
 }
 ],
 "image_url": "http://my-website.com/path/to/image.jpg",
 "thumb_url": "http://example.com/path/to/thumb.png",
 "footer": "Slack API",
 "footer_icon": "https://platform.slack-edge.com/img/default_application_icon.png",
 "ts": 123456789
 }
 ]
}
Categories:
I have the same question (0)
  • Verified answer
    v-yuazh-msft Profile Picture
    on at

    Hi @JaseC,

     

    The function to post Slack message as an attachment is not supported in microsoft flow currently.

    I afraid that there is no way to achieve your needs in Microsoft Flow currently.

     

    If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

     

    Best regards,

    Alice

  • GabrielStJohn Profile Picture
    on at

    Hello, @JaseC!

    Thank you for posting on the Flow Community Forum! If you have already posted your idea to the Flow Community Ideas Forum or found an existing idea to upvote, then you need to post the URL to the idea’s thread as a reply to this thread. Then click "Accept as Solution" on the reply if you approve it as a solution to your issue so that other users may vote for the Flow Idea and identify the information easily within this thread.

    Thank You for being an active member of the Flow Community!

    -Gabriel
    Flow Community Manager

  • Community Power Platform Member Profile Picture
    on at

    Hello -

     

    There is actually a fix or work around for Slack to receive attachments for messages as you seek but not from the Slack action option but using the 'HTTP' action instead. This would involve in setting up a slack bot within your workspace in Slack and creating a incoming webhook for this Slack bot to the designated slack channel you desire. Here's a break down:

     

    1. Once your created a blank Flow template, search for 'HTTP Request' as the trigger:

    2. Configure the 'HTTP Request' as you need with a custom JSON payload but ensure the method is set as a 'POST'. You will be provided a URL which will be plugged into your 3rd party application example, New Relic or some type of Logic App.

    3. Next, add an action by searching for 'Control' conditioner.

    4. Configure as you see fit following the results from the incoming HTTP request.

    5. The control conditioner gives you an 'if yes' or 'if no' options... Configure both by searching for another action named 'HTTP'. The method remains the same as 'POST' and input any custom header information you may have if needed. The URI will be your incoming webhook URL from your Slack bot in your workspace. The body option is where you would input your custom Slack message to be displayed in Slack. Also, authentication and value are set per security settings within your workspace. But normally, default is usually 'raw' with value defined as 'application/json'.

     

    I've also ran into a snag with the HTTP Request URL output as its encoded and my 3rd party application service could not recognize it so I had to decode the URL from Flow and once I did that, things started rolling from there.

     

    Hope this helps.

  • Community Power Platform Member Profile Picture
    on at

    Hello -

     

    There is actually a fix or work around for Slack to receive attachments for messages as you seek but not from the Slack action option but using the 'HTTP' action instead. This would involve in setting up a slack bot within your workspace in Slack and creating a incoming webhook for this Slack bot to the designated slack channel you desire. Here's a break down:

     

    1. Once your created a blank Flow template, search for 'HTTP Request' as the trigger:

    2. Configure the 'HTTP Request' as you need with a custom JSON payload but ensure the method is set as a 'POST'. You will be provided a URL which will be plugged into your 3rd party application example, New Relic or some type of Logic App.

    3. Next, add an action by searching for 'Control' conditioner.

    4. Configure as you see fit following the results from the incoming HTTP request.

    5. The control conditioner gives you an 'if yes' or 'if no' options... Configure both by searching for another action named 'HTTP'. The method remains the same as 'POST' and input any custom header information you may have if needed. The URI will be your incoming webhook URL from your Slack bot in your workspace. The body option is where you would input your custom Slack message to be displayed in Slack. Also, authentication and value are set per security settings within your workspace. But normally, default is usually 'raw' with value defined as 'application/json'.

     

    I've also ran into a snag with the HTTP Request URL output as its encoded and my 3rd party application service could not recognize it so I had to decode the URL from Flow and once I did that, things started rolling from there.

     

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard