Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Unable to extract message details from a Teams Trigger

Posted on by
Hi,
  I am new to Power Automate. I am writing a simple flow , which says when a new message is posted in Teams, send it to Whatsapp.  The good news is that it works. I used a custom connector from Twilio and it worked fine. 
My challenge is (for which i couldn't find a solution).
I use a trigger called - When a new chat message is added to trigger the flow.  I then use a HTTP Connector to snd message to whatsapp. The challenge I am facing is that I am not able to extract message from Teams chat and post it on Whatsapp . it works good with a hard coded message. The issue is in the body tag (&Body=).
 
Any suggestions on how could i extract the message from teams ?
 
This is my configuration of HTTP connector.
 
"type": "Http",
  "inputs": {
    "uri": "https://api.twilio.com/2010-04-01/Accounts/xxxxx/Messages.json",
    "method": "POST",
    "headers": {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    "body": "From=@{encodeUriComponent('whatsapp:+yyyyy')}&To=@{encodeUriComponent('whatsapp:+xxxxx')}&Body=@{encodeUriComponent(triggerOutputs()?['body']['value'])}",
    "authentication": {
      "type": "Basic",
      "username": "ACb8f3c13576260e9859ae0f6cb33eeebc",
      "password": "5a3f5fc58eea11f5c8320aa1ab3a829d"
    }
  },
  "runAfter": {},
  "runtimeConfiguration": {
    "contentTransfer": {
      "transferMode": "Chunked"
    }
  }
}

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard