The Cloudsmith Developer Hub

Welcome to the Cloudsmith Developer Hub. You'll find comprehensive guides and documentation to help you start working with Cloudsmith as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Microsoft Teams

How to integrate Microsoft Teams with Cloudsmith

This guide shows you how to post a message like an example below to a Microsoft Teams channel every time a package is successfully uploaded.

Configure Incoming Webhooks on Microsoft Teams

At the time of writing you can configure your Microsoft Teams Channel according to the official Microsoft Teams Documentation.

Copy the webhook URL, which looks like:

https://outlook.office.com/webhook/[email protected]8cbfabd1e/IncomingWebhook/a13e5467392546e0bbad03ea34559ba7/262349195-a10e-4018-9359-ds5a02y3702b

Create Webhook on Cloudsmith

  1. Open your repository in Cloudsmith and browse to the 'Webhooks' page using the menu on the left
  2. Choose to 'Create Webhook'
  3. Add the webhook URL from above to the box labeled 'Target Endpoint URL'
  4. Choose 'Handlebars Template' as the 'Payload Format'
  5. Select 'Package Synchronised' from the row of events
  6. Add your handlebars code; the template below produced the message shown above
  7. Under 'Webhook Event Subscriptions' select 'Send Specific Events (choose)' then check 'Package Synchronised'
{
  "text": "New package from _{{ data.uploader }}_",
  "attachments": [
    {
      "fallback": "{{ data.filename }} version {{ data.version }} by {{ data.uploader }}",
      "text": "{{ data.summary }}",
      "title": "{{ data.filename }}",
      "title_link": "https://cloudsmith.io/user/login/?next=/package/ns/{{ data.namespace }}/repos/{{ data.repository }}/packages/detail/{{ data.slug }}",
      "mrkdwn_in": ["fields"],
      "color": "good",
      "fields": [
        {
          "title": "Repository",
          "value": "{{ data.repository }}",
          "short": true
        },
        {
          "title": "Version",
          "value": "{{ data.version }}",
          "short": true
        },
        {
          "title": "Description",
          "value": "{{ data.description }}",
          "short": false
        }
      ]
    }
  ]
}

Upload a package and enjoy the awesome automated Microsoft Teams posts!

📘

Webhook Event Types

For more information about the events triggered by the package synchronization process please see here

Updated 23 days ago


Microsoft Teams


How to integrate Microsoft Teams with Cloudsmith

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.