cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bai-simon
New Member

Error Posting Message to Dynamic Teams Channel

I built the following flow:

 

1. SQL STATEMENT

 

Result (dummy data):

CityText
AmsterdamThe temperature is 14 degrees celcius today
BerlinThe temperature is 11 degrees celcius today
CopenhagenThe temperature is 15 degrees celcius today

 

2. FOR EACH CONTAINER

 

2.1 CREATE TEAMS CHANNEL

Team: My Team

Channel: items('Apply_to_each')?'['City']

 

2.2 POST TO TEAMS CHANNEL

Team: My Team

Channel: items('Apply_to_each')?'['City']

Message: items('Apply_to_each')?'['Text']

 

ERROR 

"error": {
"code": "BadRequest",
"message": "Bad Request",
"innerError": {
"request-id": "",
"date": "2019-12-06T07:58:11"
}
 
Whatever I do or try, I get this error in step 2.2.
 
Do you have any idea what could solve this?
1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @bai-simon,

 

If post a message to Channel, the field *Channel should be Channel ID, it is a string of characters, not its display name:

Annotation 2019-12-09 092647.png

So, you should get the Channel ID according to the displayName by filter query, then use the Channel ID to put into the field *Channel to post massage.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-litu-msft
Community Support
Community Support

Hi @bai-simon,

 

If post a message to Channel, the field *Channel should be Channel ID, it is a string of characters, not its display name:

Annotation 2019-12-09 092647.png

So, you should get the Channel ID according to the displayName by filter query, then use the Channel ID to put into the field *Channel to post massage.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks, that fixed it! It is interesting because if I put the name of the channel as a string, it works, but as a parameter, it needs the Id.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,916)