cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Type is Required ERROR - Post a message to Teams for a selected row

I have completed a Flow for using the "Post a message to Teams for a selected row" template. Unfortunately after completing all fields, I get an error for the Teams Post Message section that "Type is required".  There is no field for type. Any recommendations?
Flow teams message TYPE is required.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

I have made a test on my side, it has the same issue with you.

I think it's because of the update of MS Teams connector.

The template still use the old action.

I suggest you delete the action 'Post message', and add the 'Post a message' by yourself.

Capture13.PNG

Best Regards,

Community Support Team _ Zhongys

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

6 REPLIES 6
Anonymous
Not applicable

Can you please peek the code and see if there's anything related to Type? Sometime it happens if you have added a filed Type which is a required and deleted the field because it's not needed. If you see Type in the code, you can try creating a new flow and execute it. If it doesn't work, providing the execution output from previous runs helps to figure out the problem.

Anonymous
Not applicable

Thank you @Anonymous for your response. I peeked the code and listed it below. There is only one "type" reference and I highlighted in red. 

 

{
    "inputs": {
        "host": {
            "connection": {
                "name": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_teams']['connectionId']"
            },
            "api": {
                "runtimeUrl": "https://msmanaged-na.azure-apim.net/apim/teams"
            }
        },
        "method": "post",
        "body": {
            "rootMessage": {
                "body": {}
            }
        },
        "path": "/beta/groups/@{encodeURIComponent('0380892c-a707-4c31-a35f-b77261156c77')}/channels/@{encodeURIComponent('19:71ce6d0ca6974af1bd99dcd62c357b85@thread.skype')}/chatThreads",
        "authentication": {
            "type": "Raw",
            "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
        }
    },
    "metadata": {
        "flowSystemMetadata": {
            "swaggerOperationId": "PostMessageToChannel"
        }
    }
}

When I created the Flow, I opened the user input option, cancelled it, etc just to explore all the functionality. Perhaps this caused the error?  i have never run the Flow because of the error.
flow choose type of user input.PNG

Anonymous
Not applicable

@Anonymous  I tried creating another Flow using the same template but not clicking the User input options. Flow checker showed no errors until I clicked Save, then I got the same 'Type is required' error.
Flow teams message TYPE is required try 2.PNG
Any recommendations?

Anonymous
Not applicable

Has anyone else experienced this error?

Hi @Anonymous ,

I have made a test on my side, it has the same issue with you.

I think it's because of the update of MS Teams connector.

The template still use the old action.

I suggest you delete the action 'Post message', and add the 'Post a message' by yourself.

Capture13.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-yamao-msft - That was the solution! Thanks so much for your response.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,665)