> For the complete documentation index, see [llms.txt](https://docs.flextudio.com/flextudio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flextudio.com/flextudio/flex/undefined-1/f/f.teamsbot.md).

# f.TeamsBot()

f.TeamsBot()

## 개요

Azure Entra에 등록된 Teams Bot을 사용해 사용자에게 메세지를 전송할 수 있습니다.

## 기능 요소

| 요소명                                                                                  | 설명                       |
| ------------------------------------------------------------------------------------ | ------------------------ |
| [setTitle()](/flextudio/flex/undefined-1/f/f.teamsbot/f.teamsbot-.settitle.md)       | 메세지 제목을 설정합니다.           |
| [setBody()](/flextudio/flex/undefined-1/f/f.teamsbot/f.teamsbot-.setbody.md)         | 메세지 내용을 설정합니다.           |
| [setURL()](/flextudio/flex/undefined-1/f/f.teamsbot/f.teamsbot-.seturl.md)           | 해당 URL로 이동하는 버튼을 추가합니다.  |
| [setImageURL()](/flextudio/flex/undefined-1/f/f.teamsbot/f.teamsbot-.setimageurl.md) | 메세지에 해당 URL의 이미지를 추가합니다. |
| [addReceiver()](/flextudio/flex/undefined-1/f/f.teamsbot/f.teamsbot-.addreceiver.md) | 메세지를 수신할 사용자의 ID를 설정합니다. |
| [send()](/flextudio/flex/undefined-1/f/f.teamsbot/f.teamsbot-.send.md)               | 메세지를 전송합니다.              |

## 사용 예시

```javascript
var teams = f.TeamsBot()
teams.setTitle('결재 알림')
teams.setBody('결재가 완료되었습니다.')
teams.setURL('https://www.flextudio.com')
teams.setImageURL('https://ws.flextudio.com/flex/FlextudioCommonImg/FlextudioBN.png')
teams.addReceiver('1')
teams.send(function (isSuccess, result) {
    if (!isSuccess) {
        // 메세지 전송 요청 실패
        return;
    }
    // 성공한 수신자
    console.log(result.Success);

    // 실패한 수신자 및 사유
    console.log(result.Failed);
});

// Method Chaining도 지원합니다.
f.TeamsBot().setTitle('결재 알림')
            .setBody('결재가 완료되었습니다.')
            .setURL('https://www.flextudio.com')
            .setImageURL('https://ws.flextudio.com/flex/FlextudioCommonImg/FlextudioBN.png')
            .addReceiver('1')
            .send(function (isSuccess, result) {
                if (!isSuccess) {
                    // 메세지 전송 요청 실패
                    return;
                }
                // 성공한 수신자
                console.log(result.Success);
            
                // 실패한 수신자 및 사유
                console.log(result.Failed);
            });
```

<figure><img src="https://3692858826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnEaccHKpzIIeXyj1yXLr%2Fuploads%2F4vBYLZGF5HxuI6F9JYLW%2F2.png?alt=media&amp;token=5896c116-5769-48d0-af15-0851141a014e" alt=""><figcaption><p>Teams Bot 메세지 예시</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flextudio.com/flextudio/flex/undefined-1/f/f.teamsbot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
