Cannot attach files in workflow

Description of issue:

1. One creates a task with pdf-file attached (or any else)

2. Workflow triggers and push a notify in Mattermost channel about the task

We also need a file to be sent in Mattermost. As I understand, there is no possibility to send the attached file. Am I wrong? Could you tell if you're planning to make it possible?

Waiting for answer, thanks

0
3 comments
Hello,

I'm Lena from the YouTrack Team. As I understand, you use the Mattermost API to send a notification. If it supports sending the files, you can GET the attached file using the YouTrack REST API and post it to Mattermost. Here you can find an example of how to work with the attachments with our REST API: https://www.jetbrains.com/help/youtrack/devportal/operations-api-issues-issueID-attachments.html#get-IssueAttachment-method
0

Lena Vostrikova, hello! Планируется ли в будущем использование стандартной библиотекой http потоков stream api для отправки/получения данных, не прибегая к костылям в виде сторонних сервисов?

0

Не могли бы вы немного пояснить, что вы имеете в виду? Какой бы вы хотели видеть сценарий? 

Если я правильно понимаю ваш текущий сценарий, то для того, чтобы посылать файлы в Mattermost, вам не нужны будут сторонние сервисы, достаточно будет обойтись средствами workflow и из правила workflow посылать REST-запросы в Mattermost.

О том, как посылать REST- запросы из workflow, можно почитать здесь: https://www.jetbrains.com/help/youtrack/devportal/JS-Workflow-REST-API.html

0

Please sign in to leave a comment.