slack webhook html table












25















I have a html table that I am trying to post to slack via webhook. Is there a way to post html table to slack? Below is the html code -



<!DOCTYPE html>
<html>
<head>
<title>HTML Tables</title>
</head>
<body>
<table border="1">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
</body>
</html>









share|improve this question



























    25















    I have a html table that I am trying to post to slack via webhook. Is there a way to post html table to slack? Below is the html code -



    <!DOCTYPE html>
    <html>
    <head>
    <title>HTML Tables</title>
    </head>
    <body>
    <table border="1">
    <tr>
    <td>Row 1, Column 1</td>
    <td>Row 1, Column 2</td>
    </tr>
    <tr>
    <td>Row 2, Column 1</td>
    <td>Row 2, Column 2</td>
    </tr>
    </table>
    </body>
    </html>









    share|improve this question

























      25












      25








      25


      4






      I have a html table that I am trying to post to slack via webhook. Is there a way to post html table to slack? Below is the html code -



      <!DOCTYPE html>
      <html>
      <head>
      <title>HTML Tables</title>
      </head>
      <body>
      <table border="1">
      <tr>
      <td>Row 1, Column 1</td>
      <td>Row 1, Column 2</td>
      </tr>
      <tr>
      <td>Row 2, Column 1</td>
      <td>Row 2, Column 2</td>
      </tr>
      </table>
      </body>
      </html>









      share|improve this question














      I have a html table that I am trying to post to slack via webhook. Is there a way to post html table to slack? Below is the html code -



      <!DOCTYPE html>
      <html>
      <head>
      <title>HTML Tables</title>
      </head>
      <body>
      <table border="1">
      <tr>
      <td>Row 1, Column 1</td>
      <td>Row 1, Column 2</td>
      </tr>
      <tr>
      <td>Row 2, Column 1</td>
      <td>Row 2, Column 2</td>
      </tr>
      </table>
      </body>
      </html>






      webhooks slack-api slack






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 6 '16 at 20:09









      Punter VickyPunter Vicky

      3,7442077134




      3,7442077134
























          3 Answers
          3






          active

          oldest

          votes


















          25














          No, I don't believe there's any way to draw a table in a Slack message.



          Here are other available options for formatting Slack messages: https://api.slack.com/docs/formatting.






          share|improve this answer

































            32














            I have opened a ticket to Slack support asking if Slack's Incoming Webhook message supports table of any form (HTML or Markdown).



            The official answer is that Slack messages do not support tables.



            They suggest to generate a table and post it as an image.



            They also said that they will add it to their backlog.






            share|improve this answer





















            • 3





              Thanks. I ended up sending emails to slack channel to get the formatted table.

              – Punter Vicky
              Aug 23 '16 at 14:16











            • You're welcome :)

              – Sahar Menashe
              Aug 23 '16 at 18:22











            • I'd like to re-open the same discussion here. What is the best way to backend render table? @PunterVicky did you find a reliable solution?

              – cmertayak
              Nov 24 '17 at 18:57













            • @cmertayak I didn’t try it recently. But I had sent an email with formatted html when I posted this question as I didn’t find a reliable solution

              – Punter Vicky
              Nov 27 '17 at 4:12











            • Thanks @PunterVicky . If I find a reliable solution I will write a reply.

              – cmertayak
              Nov 27 '17 at 7:52



















            8














            Not a html table specifically, but you may use a package like console.table to print your table's data into a string variable. Then use triple backticks to add your table in your slack message's text field. For example:



            const cTable = require('console.table');
            const table = cTable.getTable([
            {
            name: 'foo',
            age: 10
            }, {
            name: 'bar',
            age: 20
            }
            ]);


            and then as part of your slack message's attachment:



            const attachmentList = {
            "title": "YOUR TITLE",
            "text": 'HERE IS YOUR TABLE: : n ```'+table+'```',
            }





            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f37080635%2fslack-webhook-html-table%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              25














              No, I don't believe there's any way to draw a table in a Slack message.



              Here are other available options for formatting Slack messages: https://api.slack.com/docs/formatting.






              share|improve this answer






























                25














                No, I don't believe there's any way to draw a table in a Slack message.



                Here are other available options for formatting Slack messages: https://api.slack.com/docs/formatting.






                share|improve this answer




























                  25












                  25








                  25







                  No, I don't believe there's any way to draw a table in a Slack message.



                  Here are other available options for formatting Slack messages: https://api.slack.com/docs/formatting.






                  share|improve this answer















                  No, I don't believe there's any way to draw a table in a Slack message.



                  Here are other available options for formatting Slack messages: https://api.slack.com/docs/formatting.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 12 '18 at 14:41









                  Uri

                  13.8k43053




                  13.8k43053










                  answered May 6 '16 at 21:02









                  smarxsmarx

                  48.4k45971




                  48.4k45971

























                      32














                      I have opened a ticket to Slack support asking if Slack's Incoming Webhook message supports table of any form (HTML or Markdown).



                      The official answer is that Slack messages do not support tables.



                      They suggest to generate a table and post it as an image.



                      They also said that they will add it to their backlog.






                      share|improve this answer





















                      • 3





                        Thanks. I ended up sending emails to slack channel to get the formatted table.

                        – Punter Vicky
                        Aug 23 '16 at 14:16











                      • You're welcome :)

                        – Sahar Menashe
                        Aug 23 '16 at 18:22











                      • I'd like to re-open the same discussion here. What is the best way to backend render table? @PunterVicky did you find a reliable solution?

                        – cmertayak
                        Nov 24 '17 at 18:57













                      • @cmertayak I didn’t try it recently. But I had sent an email with formatted html when I posted this question as I didn’t find a reliable solution

                        – Punter Vicky
                        Nov 27 '17 at 4:12











                      • Thanks @PunterVicky . If I find a reliable solution I will write a reply.

                        – cmertayak
                        Nov 27 '17 at 7:52
















                      32














                      I have opened a ticket to Slack support asking if Slack's Incoming Webhook message supports table of any form (HTML or Markdown).



                      The official answer is that Slack messages do not support tables.



                      They suggest to generate a table and post it as an image.



                      They also said that they will add it to their backlog.






                      share|improve this answer





















                      • 3





                        Thanks. I ended up sending emails to slack channel to get the formatted table.

                        – Punter Vicky
                        Aug 23 '16 at 14:16











                      • You're welcome :)

                        – Sahar Menashe
                        Aug 23 '16 at 18:22











                      • I'd like to re-open the same discussion here. What is the best way to backend render table? @PunterVicky did you find a reliable solution?

                        – cmertayak
                        Nov 24 '17 at 18:57













                      • @cmertayak I didn’t try it recently. But I had sent an email with formatted html when I posted this question as I didn’t find a reliable solution

                        – Punter Vicky
                        Nov 27 '17 at 4:12











                      • Thanks @PunterVicky . If I find a reliable solution I will write a reply.

                        – cmertayak
                        Nov 27 '17 at 7:52














                      32












                      32








                      32







                      I have opened a ticket to Slack support asking if Slack's Incoming Webhook message supports table of any form (HTML or Markdown).



                      The official answer is that Slack messages do not support tables.



                      They suggest to generate a table and post it as an image.



                      They also said that they will add it to their backlog.






                      share|improve this answer















                      I have opened a ticket to Slack support asking if Slack's Incoming Webhook message supports table of any form (HTML or Markdown).



                      The official answer is that Slack messages do not support tables.



                      They suggest to generate a table and post it as an image.



                      They also said that they will add it to their backlog.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jan 31 '18 at 6:58









                      Yassine El Badaoui

                      347412




                      347412










                      answered Aug 23 '16 at 13:45









                      Sahar MenasheSahar Menashe

                      9141015




                      9141015








                      • 3





                        Thanks. I ended up sending emails to slack channel to get the formatted table.

                        – Punter Vicky
                        Aug 23 '16 at 14:16











                      • You're welcome :)

                        – Sahar Menashe
                        Aug 23 '16 at 18:22











                      • I'd like to re-open the same discussion here. What is the best way to backend render table? @PunterVicky did you find a reliable solution?

                        – cmertayak
                        Nov 24 '17 at 18:57













                      • @cmertayak I didn’t try it recently. But I had sent an email with formatted html when I posted this question as I didn’t find a reliable solution

                        – Punter Vicky
                        Nov 27 '17 at 4:12











                      • Thanks @PunterVicky . If I find a reliable solution I will write a reply.

                        – cmertayak
                        Nov 27 '17 at 7:52














                      • 3





                        Thanks. I ended up sending emails to slack channel to get the formatted table.

                        – Punter Vicky
                        Aug 23 '16 at 14:16











                      • You're welcome :)

                        – Sahar Menashe
                        Aug 23 '16 at 18:22











                      • I'd like to re-open the same discussion here. What is the best way to backend render table? @PunterVicky did you find a reliable solution?

                        – cmertayak
                        Nov 24 '17 at 18:57













                      • @cmertayak I didn’t try it recently. But I had sent an email with formatted html when I posted this question as I didn’t find a reliable solution

                        – Punter Vicky
                        Nov 27 '17 at 4:12











                      • Thanks @PunterVicky . If I find a reliable solution I will write a reply.

                        – cmertayak
                        Nov 27 '17 at 7:52








                      3




                      3





                      Thanks. I ended up sending emails to slack channel to get the formatted table.

                      – Punter Vicky
                      Aug 23 '16 at 14:16





                      Thanks. I ended up sending emails to slack channel to get the formatted table.

                      – Punter Vicky
                      Aug 23 '16 at 14:16













                      You're welcome :)

                      – Sahar Menashe
                      Aug 23 '16 at 18:22





                      You're welcome :)

                      – Sahar Menashe
                      Aug 23 '16 at 18:22













                      I'd like to re-open the same discussion here. What is the best way to backend render table? @PunterVicky did you find a reliable solution?

                      – cmertayak
                      Nov 24 '17 at 18:57







                      I'd like to re-open the same discussion here. What is the best way to backend render table? @PunterVicky did you find a reliable solution?

                      – cmertayak
                      Nov 24 '17 at 18:57















                      @cmertayak I didn’t try it recently. But I had sent an email with formatted html when I posted this question as I didn’t find a reliable solution

                      – Punter Vicky
                      Nov 27 '17 at 4:12





                      @cmertayak I didn’t try it recently. But I had sent an email with formatted html when I posted this question as I didn’t find a reliable solution

                      – Punter Vicky
                      Nov 27 '17 at 4:12













                      Thanks @PunterVicky . If I find a reliable solution I will write a reply.

                      – cmertayak
                      Nov 27 '17 at 7:52





                      Thanks @PunterVicky . If I find a reliable solution I will write a reply.

                      – cmertayak
                      Nov 27 '17 at 7:52











                      8














                      Not a html table specifically, but you may use a package like console.table to print your table's data into a string variable. Then use triple backticks to add your table in your slack message's text field. For example:



                      const cTable = require('console.table');
                      const table = cTable.getTable([
                      {
                      name: 'foo',
                      age: 10
                      }, {
                      name: 'bar',
                      age: 20
                      }
                      ]);


                      and then as part of your slack message's attachment:



                      const attachmentList = {
                      "title": "YOUR TITLE",
                      "text": 'HERE IS YOUR TABLE: : n ```'+table+'```',
                      }





                      share|improve this answer




























                        8














                        Not a html table specifically, but you may use a package like console.table to print your table's data into a string variable. Then use triple backticks to add your table in your slack message's text field. For example:



                        const cTable = require('console.table');
                        const table = cTable.getTable([
                        {
                        name: 'foo',
                        age: 10
                        }, {
                        name: 'bar',
                        age: 20
                        }
                        ]);


                        and then as part of your slack message's attachment:



                        const attachmentList = {
                        "title": "YOUR TITLE",
                        "text": 'HERE IS YOUR TABLE: : n ```'+table+'```',
                        }





                        share|improve this answer


























                          8












                          8








                          8







                          Not a html table specifically, but you may use a package like console.table to print your table's data into a string variable. Then use triple backticks to add your table in your slack message's text field. For example:



                          const cTable = require('console.table');
                          const table = cTable.getTable([
                          {
                          name: 'foo',
                          age: 10
                          }, {
                          name: 'bar',
                          age: 20
                          }
                          ]);


                          and then as part of your slack message's attachment:



                          const attachmentList = {
                          "title": "YOUR TITLE",
                          "text": 'HERE IS YOUR TABLE: : n ```'+table+'```',
                          }





                          share|improve this answer













                          Not a html table specifically, but you may use a package like console.table to print your table's data into a string variable. Then use triple backticks to add your table in your slack message's text field. For example:



                          const cTable = require('console.table');
                          const table = cTable.getTable([
                          {
                          name: 'foo',
                          age: 10
                          }, {
                          name: 'bar',
                          age: 20
                          }
                          ]);


                          and then as part of your slack message's attachment:



                          const attachmentList = {
                          "title": "YOUR TITLE",
                          "text": 'HERE IS YOUR TABLE: : n ```'+table+'```',
                          }






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jun 5 '18 at 18:03









                          NimaNima

                          8818




                          8818






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f37080635%2fslack-webhook-html-table%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Full-time equivalent

                              Bicuculline

                              さくらももこ