rfu
(rfu)
July 17, 2025, 12:51am
1
こんにちは。
いま、UiPathからTeamsの特定チャネルに対して、
(可能ならば添付ファイルを付けつつ)メッセージを送信したいと思っています。
AutomationCloudを利用している場合はIntegrationService経由で
コネクターを作ってそれにアクセスして・・というのがなんとなくイメージできたのですが、
Orchestratorがオンプレ、ないし利用していない場合は
どのように実装していけばよいか、とっかかりをご教示いただけませんでしょうか。
※なお、環境上の制約でメール送信が許可されていないため
チャネルのメールアドレスに向けてメールを送る・・という方法は使えません。
皆様のお知恵をお借りできればと。よろしくお願いいたします。
Hi @rfu
You can try below.
Please note it’s generated by LLM. I have not done this before but solution seems doable so would suggest to give it a try.
If you are not interested in trying this option, then another alternative is to send teams message using power automate and integrate power automate workflow with UiPath. By using http request, call power automate workflow which will send the teams message to the channel.
Prerequisites
Access to Azure Portal (to register your app)
UiPath Studio (Desktop version)
HTTP Request activity from UiPath.WebAPI.Activities
package
Step-by-Step Guide
1. Register an App in Azure AD
Go to https://portal.azure.com
Navigate to Azure Active Directory > App Registrations
Click New registration
Name: UiPathGraphAPI
Redirect URI: http://localhost
(you can leave it if not used)
Save the Application (client) ID and Directory (tenant) ID
2. API Permissions
Go to API permissions
Click Add a permission > Microsoft Graph > Application permissions
Add:
ChannelMessage.Send
Group.Read.All
Click Grant admin consent
3. Create Client Secret
Go to Certificates & Secrets
Click New Client Secret
Save the secret value (not just the ID)
4. Get Access Token in UiPath
Use HTTP Request activity to get the token.
bash
Copy code
POST https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/token
bash
Copy code
Content-Type: application/x-www-form-urlencoded
Body (x-www-form-urlencoded):
ini
Copy code
client_id=<YOUR_CLIENT_ID>&
scope=https://graph.microsoft.com/.default&
client_secret=<YOUR_CLIENT_SECRET>&
grant_type=client_credentials
Parse the response JSON to extract the access_token
.
5. Send Message to Teams Channel
Use another HTTP Request activity:
bash
Copy code
POST https://graph.microsoft.com/v1.0/teams/<TEAM_ID>/channels/<CHANNEL_ID>/messages
pgsql
Copy code
Authorization: Bearer <access_token>
Content-Type: application/json
json
Copy code
{
"body": {
"content": "Hello from UiPath on-prem bot!"
}
}
How to Get TEAM_ID and CHANNEL_ID
You can call this endpoint to list your Teams:
sql
Copy code
GET https://graph.microsoft.com/v1.0/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')
And then this to get channels in a team:
bash
Copy code
GET https://graph.microsoft.com/v1.0/teams/{team-id}/channels
Testing
Once both requests work, wrap them in a UiPath workflow:
First HTTP call → Get token
Second HTTP call → Send message
Hope this helps.
Regards
Sonali
1 Like
rfu
(rfu)
July 17, 2025, 1:24am
3
Thanks for your response, and sorry for my reply is in Japanese.
AzureポータルからUiPath連携用の外部アプリケーションを登録し、
アプリケーションIDとテナントIDを取得。
その後それを用いてHTTP要求を投げて認証→メッセージを送信するイメージでしょうか。
(おそらくこの前に対象チャネルのIDを取得する作業があると思いますが)
この部分はきっとMicrosoftTeams.Activitiesで代用できそうですね。
Teamsを管理したことがないので、Azureポータルの操作感がピンとこないのですが、
ひとまず管理者に問い合わせてみようと思います。
Yoichi
(Yoichi)
July 17, 2025, 2:00am
4
こんにちは
取り急ぎ以下試してみてはと思います。(こちらはIntegrationService経由ではないと思います)
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
1 Like
rfu
(rfu)
July 17, 2025, 3:07am
5
返信ありがとうございます。
そうですね、こちらのアクティビティを利用する前提で、
上記で提案頂いている外部アプリの登録を行い、疎通を確認してみたいと思います。