# Microsoft Teams integration (Workflows)

# MS Teams Configuration: Creating a Channel

To integrate MS Teams with Pandora FMS, first go to the group where the alert messages will be sent. Once there, select the **Add channel** option:

[![PFMS_MS_Teams_integration_020.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-04/scaled-1680-/pfms-ms-teams-integration-020.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-04/pfms-ms-teams-integration-020.png)

Enter a name, an optional description, and the permissions so that each team member has access to the new channel, then click the **Add** button.

[![PFMS_MS_Teams_integration_030.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-04/scaled-1680-/pfms-ms-teams-integration-030.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-04/pfms-ms-teams-integration-030.png)

[&lt; PREVIOUS](https://pandorafms.com/guides/public/books/integracion-con-microsoft-teams) [NEXT &gt;](https://pandorafms.com/guides/public/books/integracion-con-microsoft-teams/page/configuracion-en-ms-teams-creacion-de-un-enlace-de-autorizacion)

# MS Teams Configuration: Creating an Authorization URL

Microsoft Teams has replaced the classic "Incoming Webhooks" with **Workflows** (based on Power Automate). Follow these steps to get your URL directly from a channel:

1. **Select the Channel:** Go to the specific team and channel where you want to receive Pandora FMS notifications.  
      
    [![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/aKCimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/aKCimage.png)
2. **Access Workflows:**
    - Haz clic en los tres puntos (`...`) junto al nombre del canal.
    - Selecciona la opción **Workflows**
3. **Create a New Workflow:**
    - Click the **+ New workflow** or **Create** button.
    - In the template search box, type: `"Send webhook alerts to channel"`
    - Select the template with that exact name.
        
        [![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/ZmIimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/ZmIimage.png)
4. **Configure the Flow:**
    - Select a group and channel to send the message to.  
          
        [![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/1Rzimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/1Rzimage.png)
    - Click **Save**.
5. **Get the URL:**
    - Once created, a confirmation screen will appear.  
        [![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/hGmimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/hGmimage.png)
    - Copy the URL that appears by clicking the **Copy webhook link** button. **This is the URL you should use in the `-u` or `--url` parameter of the script.**
6. **Finish:** Everything is now configured; you can return to the chat window.

> **Note:** If you need to retrieve the URL later, you can go to the **Workflows** app in the Teams sidebar, enter **Manage workflows**, and edit the corresponding flow.

[&lt; PREVIOUS](https://pandorafms.com/guides/public/books/integracion-con-microsoft-teams/page/configuracion-en-ms-teams-creacion-de-un-canal) [NEXT &gt;](https://pandorafms.com/guides/public/books/integracion-con-microsoft-teams/page/configuracion-en-pandora-fms-creacion-de-un-comando-de-alerta)

# Plugin parameters and manual execution

Download the *CLI* from the Pandora FMS marketplace and unzip it on the Pandora FMS server (the recommended location is `/usr/share/pandora_server/util/pandora-msteams-workflow` or any other where the Pandora FMS server has read and execute permissions).

It is recommended to perform a test in the command terminal with the following format:

### Script Parameters

<div class="code-line" data-line="51" dir="auto" id="bkmrk-">  
</div><table class="code-line" data-line="16" dir="auto" id="bkmrk-par%C3%A1metro-%28corto%29-pa"><thead class="code-line" data-line="16" dir="auto"><tr class="code-line" data-line="16" dir="auto"><th>Parameter (Short)</th><th>Parameter (Long)</th><th>Description</th><th>Required</th><th>Default Value</th></tr></thead><tbody class="code-line" data-line="18" dir="auto"><tr class="code-line" data-line="18" dir="auto"><td>`-u`</td><td>`--url`</td><td>\*\*Teams Webhook URL\*\*. Generated by the Power Automate flow.</td><td>\*\*Yes\*\*</td><td>-</td></tr><tr class="code-line" data-line="19" dir="auto"><td>`-d`</td><td>`--data`</td><td>\*\*Alert data\*\* in `key=value` format separated by commas.</td><td>\*\*Yes\*\*</td><td>-</td></tr><tr class="code-line" data-line="20" dir="auto"><td>`-t`</td><td>`--alert\_tittle`</td><td>Main title that will appear on the card.</td><td>No</td><td>`PandoraFMS alert fired`</td></tr><tr class="code-line" data-line="21" dir="auto"><td>`-D`</td><td>`--alert\_desc`</td><td>Description or additional alert text.</td><td>No</td><td>`Alert Fired`</td></tr><tr class="code-line" data-line="22" dir="auto"><td>-</td><td>`--image`</td><td>URL of the image to be displayed on the card.</td><td>No</td><td>Pandora FMS Logo</td></tr><tr class="code-line" data-line="23" dir="auto"><td>-</td><td>`--image\_size`</td><td>Image size (`Small`, `Medium`, `Large`, `Stretch`).</td><td>No</td><td>`Medium`</td></tr><tr class="code-line" data-line="24" dir="auto"><td>-</td><td>`--button`</td><td>URL to which the action button will redirect.</td><td>No</td><td>`https://pandorafms.com`</td></tr><tr class="code-line" data-line="25" dir="auto"><td>-</td><td>`--button\_desc`</td><td>Text that will be displayed inside the button.</td><td>No</td><td>`Open web console`</td></tr></tbody></table>

---

### Usage Examples

#### 1. Basic Example

Sending a simple alert with the minimum required data:

```bash
./pandora-msteams-workflow \
  --url "https://your-webhook-url" \
  --data "Agent=Server_Web_01,Module=CPU_Load,Status=Critical"


```

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/gwsimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/gwsimage.png)

#### 2. Full Example with Customization

Customizing the title, description, button, and image size:

```bash
./pandora-msteams-workflow \
  --url "https://your-webhook-url" \
  --data "Hostname=DB-Server-05,IP=10.0.0.50,Error=MySQL service is down" \
  --alert_tittle "CRITICAL: Database Failure" \
  --alert_desc "The database service has stopped responding. Please check immediately." \
  --image "https://img.icons8.com/color/96/error.png" \
  --image_size "Large" \
  --button "https://your-pandora-console.com/index.php?sec=estado&sec2=lista_agentes" \
  --button_desc "Open PandoraFMS Console"


```

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/1cPimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/1cPimage.png)

---

### Internal Operation of the `--data` Parameter

The `--data` parameter processes a text string and converts it into a list of "Facts" within the Teams Adaptive Card.

- **Correct format:** `Name=Value,OtherName=OtherValue`
- **Note:** Avoid using commas (`,`) or equals signs (`=`) within values, as the script uses them as delimiters.

[&lt; PREVIOUS](https://pandorafms.com/guides/public/books/integracion-con-microsoft-teams/page/configuracion-en-ms-teams-creacion-de-un-enlace-de-autorizacion) [NEXT &gt;](https://pandorafms.com/guides/public/books/integracion-con-microsoft-teams/page/configuracion-en-pandora-fms-creacion-de-una-accion-de-alerta)

# Pandora FMS Configuration: Creating an Alert Action

The zip package where the binary comes also contains a file called `test-exec.txt` which contains information about additional parameters that will enrich the sent message (subtitle, color, web link button, etc.).

To create an [alert command](https://prewebs.pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Alerts#Introduction_to_the_alert_system), go to the [Pandora FMS Web Console](https://prewebs.pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Interface) and click on **Alerts** -&gt; **Commands** -&gt; **Create**.

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/aj8image.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/aj8image.png)

Next, define the eight necessary fields plus the last two parameters which are constants. Make sure that field number two has the **Hide** box checked and enter the authorization link obtained on the previous page there.

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/hQaimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/hQaimage.png)

The `test-exec` file that accompanies the *Slack connector CLI* contains information that you can use to fill in these fields. Click the **Create** button to save the alert command.

[Alert actions](https://prewebs.pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Alerts#Action) allow you to define *how* to launch the command. Go to the **Alerts** -&gt; **Actions** -&gt; **Create** menu.

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/0X5image.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/0X5image.png)

Select the alert command created on the previous page in **Command**; the fields will be filled automatically. However, you can always customize the icons or messages for **Triggering** and **Recovery** events, for example.

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/scaled-1680-/KCOimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-03/KCOimage.png)

To save, click **Create**. To apply this action, whether to a [Module or Policy](https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Policies#Modules), set an [alert template](https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Alerts#Alert_template) for that purpose.

[&lt; PREVIOUS](https://pandorafms.com/guides/public/books/integracion-con-microsoft-teams/page/configuracion-en-pandora-fms-creacion-de-un-comando-de-alerta)