# MS Power Automate와 Discourse

**URL:** https://meta.discourse.org/t/ms-power-automate-and-discourse/209228
**Category:** Support
**Created:** [11월 15, 2021, 11:14오후 UTC](https://meta.discourse.org/t/ms-power-automate-and-discourse/209228 "2021-11-15T23:14:00Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [11월 16, 2021, 3:42오전 UTC](https://meta.discourse.org/t/ms-power-automate-and-discourse/209228/4 "2021-11-16T03:42:21Z")

</div>

Discourse 측면에서는 분명히 가능하지만, 저는 Power Automate에 대해 잘 모릅니다. Discourse API를 사용하여 게시물을 만들 수 있으며, 이와 같은 작업을 위해 API를 사용하는 가장 간단한 방법은 웹 요청을 보내는 것입니다.

Power Automate가(미안합니다 🙂) 사용자가 만든 이벤트의 정보를 사용하여 게시물 내용을 구성하고, 임의의 헤더와 본문이 포함된 POST 웹 요청을 보내는 기능을 제공한다면, 이를 통해 토픽을 생성할 수 있습니다.

[Discourse API 문서: 새 토픽, 새 게시물 또는 개인 메시지 생성](https://docs.discourse.org/#operation/createTopicPostPM)

토픽에 ics 파일을 추가하는 것은 조금 더 복잡하지만, 이것도 가능합니다. 먼저 업로드를 생성하고 응답에서 `short_path`를 가져온 다음, 구성한 게시물 내용에 `![Event_title.ics](short_path)`와 같은 마크다운을 포함해야 할 것 같습니다.

정확하지 않을 수 있지만, 이것이 일반적인 아이디어입니다. 업로드 생성 시 받은 응답을 사용하여 기존 ics 업로드와 동일한 형식으로 게시물에 추가하는 것입니다.

[Discourse API 문서: 업로드 생성](https://docs.discourse.org/#operation/createUpload)

인스턴스에서 `/admin/api/keys`를 방문하여 API 키를 생성할 수 있습니다. topics:write와 uploads:create가 활성화된 세밀한 스코프가 필요하며, 토픽이 생성된 것으로 표시될 단일 사용자를 선택하는 것이 좋습니다.

**참고** : uploads:create 스코프는 아직 존재하지 않지만 추가되는 과정에 있습니다. 이에 대한 논의와 진행 상황을 다음 토픽과 링크된 풀 리퀘스트에서 확인할 수 있습니다:

> [@API: /uploads에 접근 권한이 있는 scope](https://meta.discourse.org/t/api-a-scope-with-access-to-uploads/208895/11):
>
> Done. It will need testing and such but here at least is a baseline. [https://github.com/discourse/discourse/pull/14941](https://github.com/discourse/discourse/pull/14941) I used a separate scope, for the reasons described - I can certainly see that I might want to allow posts but not uploads.

---

_[View the full topic](https://meta.discourse.org/t/ms-power-automate-and-discourse/209228)._
