<p><strong>1. Create a webhook in MS Teams</strong></p>
<p>Add an incoming webhook to a Teams channel:</p>
<ul>
<li>
<p>Navigate to the channel where you want to add the webhook and select (•••) <em>Connectors</em> from the top navigation bar.</p>
</li>
<li>
<p>Search for <strong>Incoming Webhook</strong>, and add it.</p>
</li>
<li>
<p>Click <em>Configure</em> and provide a name for your webhook.</p>
</li>
<li>
<p>Copy the URL which appears and click “OK”.</p>
</li>
</ul>
<p><strong>2. Install pymsteams</strong></p>
<pre><code class="lang-auto">pip install pymsteams
</code></pre>
<p><strong>3. Create your python script</strong></p>
<pre><code class="lang-auto">import pymsteams
myTeamsMessage = pymsteams.connectorcard("<Microsoft Webhook URL>")
myTeamsMessage.text("this is my text")
myTeamsMessage.send()
</code></pre>
<p>More information available here:</p>
<p><a href="https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook">Add a webook to MS Teams</a></p>
<p><a href="https://pypi.org/project/pymsteams/">Python pymsteams library</a></p>