Home > other >  How to send artifact from GitLab to Teams
How to send artifact from GitLab to Teams

Time:02-17

I want to send an artifact from GitLab to Microsoft Team using --curl, does anyone know how I can do that? The main idea send file as attachment to Teams using curl command.

N.B. I know how to send a text, but also need to send attachment.

CodePudding user response:

I don't think it's possible to attach an -actual- file to a Teams message, rather you can link to a file that sits somewhere else, like most specifically in the SharePoint site for the Team itself, for example. So, you would, as an example:

  1. User Graph to upload the file to the SharePoint site for the Team (basically the "Files" tab in Teams)
  2. Send a Teams message using Graph, referencing the attachment. Here is an example:

https://docs.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http#example-4-send-a-message-with-file-attachment-in-it

  • Related