<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Insert comment through Teams in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/207594#M313</link>
    <description>&lt;P&gt;Tested it out, this worked for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"@type": "MessageCard",&lt;BR /&gt;"summary": "{PID}}",&lt;BR /&gt;"potentialAction": [&lt;BR /&gt;{&lt;BR /&gt;"@type": "ActionCard",&lt;BR /&gt;"name": "Add a comment",&lt;BR /&gt;"inputs": [&lt;BR /&gt;{&lt;BR /&gt;"@type": "TextInput",&lt;BR /&gt;"id": "note",&lt;BR /&gt;"isMultiline": true,&lt;BR /&gt;"title": "Add note here..."&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"actions": [&lt;BR /&gt;{&lt;BR /&gt;"@type": "httpPost",&lt;BR /&gt;"method":"POST",&lt;BR /&gt;"name": "OK",&lt;BR /&gt;"title": "Submit",&lt;BR /&gt;"headers": [&lt;BR /&gt;{&lt;BR /&gt;"name": "Authorization",&lt;BR /&gt;"value": ""&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Content-type",&lt;BR /&gt;"value": "application/json"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"target": "https:\/\/[URL]\/e\/[ENVID]\/api\/v2\/problems\/[PID]\/comments?api-token=[API-TOKEN]",&lt;BR /&gt;"body": "{\"message\":\"{{note.value}}\"}"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2023 23:34:19 GMT</pubDate>
    <dc:creator>michiel_otten</dc:creator>
    <dc:date>2023-03-21T23:34:19Z</dc:date>
    <item>
      <title>Insert comment through Teams</title>
      <link>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/206778#M309</link>
      <description>&lt;P&gt;Guys, does anyone know if it's possible to insert a comment in my problem, through Teams? I'm calling the Dyna API, passing the body, but it's not working. Has anyone ever done something like this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Biaggio_1-1678451130748.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10432i55246F7D9A9BD65F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Biaggio_1-1678451130748.png" alt="Biaggio_1-1678451130748.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Biaggio_2-1678451151620.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10433iA96BAA9C9264E2D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Biaggio_2-1678451151620.png" alt="Biaggio_2-1678451151620.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 12:26:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/206778#M309</guid>
      <dc:creator>Biaggio</dc:creator>
      <dc:date>2023-03-10T12:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Insert comment through Teams</title>
      <link>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/206865#M310</link>
      <description>&lt;P&gt;So a few things what you could try&lt;BR /&gt;- adding a content type (application/json)&lt;BR /&gt;- i'm not sure your posting a valid json in your body. Should be something like this:&lt;BR /&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt; &lt;SPAN class=""&gt;"message"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"string"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"context"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"string"&lt;/SPAN&gt; &lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 09:50:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/206865#M310</guid>
      <dc:creator>michiel_otten</dc:creator>
      <dc:date>2023-03-13T09:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Insert comment through Teams</title>
      <link>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/206888#M311</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I agree with Michiel. You should add:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Content-Type: application/json&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;"message"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"string"&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;"context"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"string"&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class=""&gt;Like you can see here:&amp;nbsp;&lt;A href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/problems-v2/comments/post-comment" target="_blank" rel="noopener"&gt;https://www.dynatrace.com/support/help/dynatrace-api/environment-api/problems-v2/comments/post-comment&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For example I add the correct curl below:&lt;/P&gt;&lt;P&gt;curl -X POST “{env_id}/api/v2/problems/{problemID}/comments" -H "accept: */*" -H "Authorization: Api-Token {token}" -H "Content-Type: application/json; charset=utf-8" -d "{\"message\":\"Example Message\",\"context\":\"Community\"}"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="comment.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10444iE218615A2392A0B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="comment.png" alt="comment.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 14:35:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/206888#M311</guid>
      <dc:creator>radek_jasinski</dc:creator>
      <dc:date>2023-03-13T14:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Insert comment through Teams</title>
      <link>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/207590#M312</link>
      <description>&lt;P&gt;I already tried that. The problem here is being configured in a way that Dynatrace understands that the content of my input is what should be sent. I've tried to pass the body in several ways. An example is below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"body":"{\"message\":\"string\",\"context\":\"string\"}={{comment.value}}"&lt;/LI-CODE&gt;&lt;P&gt;This is just an example, to show that you need to pass the&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;={{comment.value}}"&lt;/LI-CODE&gt;&lt;P&gt;With the intention that it takes the input data entered in Teams and makes the post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Biaggio_2-1679435557826.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10598iA4EB138E2D619F9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Biaggio_2-1679435557826.png" alt="Biaggio_2-1679435557826.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 21:52:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/207590#M312</guid>
      <dc:creator>Biaggio</dc:creator>
      <dc:date>2023-03-21T21:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Insert comment through Teams</title>
      <link>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/207594#M313</link>
      <description>&lt;P&gt;Tested it out, this worked for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"@type": "MessageCard",&lt;BR /&gt;"summary": "{PID}}",&lt;BR /&gt;"potentialAction": [&lt;BR /&gt;{&lt;BR /&gt;"@type": "ActionCard",&lt;BR /&gt;"name": "Add a comment",&lt;BR /&gt;"inputs": [&lt;BR /&gt;{&lt;BR /&gt;"@type": "TextInput",&lt;BR /&gt;"id": "note",&lt;BR /&gt;"isMultiline": true,&lt;BR /&gt;"title": "Add note here..."&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"actions": [&lt;BR /&gt;{&lt;BR /&gt;"@type": "httpPost",&lt;BR /&gt;"method":"POST",&lt;BR /&gt;"name": "OK",&lt;BR /&gt;"title": "Submit",&lt;BR /&gt;"headers": [&lt;BR /&gt;{&lt;BR /&gt;"name": "Authorization",&lt;BR /&gt;"value": ""&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Content-type",&lt;BR /&gt;"value": "application/json"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"target": "https:\/\/[URL]\/e\/[ENVID]\/api\/v2\/problems\/[PID]\/comments?api-token=[API-TOKEN]",&lt;BR /&gt;"body": "{\"message\":\"{{note.value}}\"}"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 23:34:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/207594#M313</guid>
      <dc:creator>michiel_otten</dc:creator>
      <dc:date>2023-03-21T23:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Insert comment through Teams</title>
      <link>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/210048#M314</link>
      <description>&lt;P&gt;Thank you very much. It worked.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 00:17:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Insert-comment-through-Teams/m-p/210048#M314</guid>
      <dc:creator>Biaggio</dc:creator>
      <dc:date>2023-04-18T00:17:24Z</dc:date>
    </item>
  </channel>
</rss>

