cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simflex
Regular Visitor

Unable to enter text into Adaptive Card Input Box

Greetings mates, 

This is my first time posting here. Please take it easy on me 🙂

 

We have been trying, for the past two days, to follow the instructions on this link:

 

https://docs.microsoft.com/en-us/powerapps/teams/extend-milestones-send-notification

to set up a flow in Power Automate to send notifications to Team when work item status is updated in the Milestones.

Everything seemed to be going well until we get to Step # 19.

On this number is the bulleted list that says:

Adaptive Card - Paste the following JSON code:

We have been unable to copy the JSON code and paste it into the Adaptive Card input box. You could type into the box but could not paste into it.

Are we missing a critical step that we are not aware of?

Please forgive me if this question is too elementary. 

Your infinite expertise and assistance is greatly appreciated here.

Thank you in advance.

 

BTW: We are designing this using Google Chrome. Not sure if this is relevant or not but thought it important information to provide it.

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @simflex ,

 

Yes, when the JSON has invalid characters, you cannot paste it in.

 

You can try pasting it as is just to see if it works first.

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

View solution in original post

8 REPLIES 8
eric-cheng
Solution Sage
Solution Sage

Hi @simflex ,

 

I have just tried in Edge and Chrome and was able to copy into the textbox with no issues.

 

Can you please try:

 

1) Copying the text to notepad first and then copying it again into your flow

2) Restarting your browser

3) Restarting your computer

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

simflex
Regular Visitor

@eric-cheng , thank you for your response.

 

Just to clarify, you copied the JSON code into the Adaptive Card input box and it got copied?

 

Am I missing Adaptive Card download and install?

I tried all your suggestions but none of those worked.

eric-cheng
Solution Sage
Solution Sage

Hi @simflex 

 

I copied JSON and just simple text and had no issues.

 

Can you post a screenshot of where you are copying to.  Just making sure we are on the same page.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

simflex
Regular Visitor

@eric-cheng,

 

Thank you once more for your assistance.

simflex_0-1633654736736.png

Below is the JSON code, I have been trying to copy and paste into this box;

{
            "type": "AdaptiveCard",
            "body": [
            {

                   "type": "TextBlock",

       "size": "large",

       "weight": "Bolder",

       "text": "Status Update for
       @{outputs('Get_Work_Item_record')?['body/msft_name']}",

       "wrap": true

       },

       {

       "type": "TextBlock",

       "text": "Status for Work Item
       '@{outputs('Get_Work_Item_record')?['body/msft_name']}' has been updated to
       @{outputs('Get_Work_Item_Status_record')?['body/msft_name']}",

       "wrap": true

       }

       ],

       "actions": [

       {

       "type": "Action.OpenUrl",

       "title": "View @{variables('varCardTitle')}",
       //Update the part of the following URL before "context=" with the URL copied in step 12. 
       "url":
       "[https://teams.microsoft.com/l/entity/040880f4-0c68-4c38-8821-d5efd2b6ddbe/_djb2_msteams_prefix_956529380?context=@{outputs('Compose](https://teams.microsoft.com/l/entity/040880f4-0c68-4c38-8821-d5efd2b6ddbe/_djb2_msteams_prefix_956529380?context=@%7boutputs('Compose)')}"

       }

       ],

       "$schema": "<http://adaptivecards.io/schemas/adaptive-card.json>",

       "version": "1.2"

       }
eric-cheng
Solution Sage
Solution Sage

Hi @simflex ,

 

Thank you for sharing.  I can now replicate the issue.  The JSON you are pasting in is not well formed i.e. has syntax errors.  Most of this is due to line breaks.  Also, the URL you are referencing seems to be an issue.

 

You can use this site to paste the JSON in and verify.

 

Try the below.  You can try specifying the URL via the designer on your end.

 

{
"type":"AdaptiveCard",
"body":[
{
"type":"TextBlock",
"size":"large",
"weight":"Bolder",
"text":"Status Update for @{outputs('Get_Work_Item_record')?['body/msft_name']}",
"wrap":true
},
{
"type":"TextBlock",
"text":"Status for Work Item '@{outputs('Get_Work_Item_record')?['body/msft_name']}' has been updated to @{outputs('Get_Work_Item_Status_record')?['body/msft_name']}",
"wrap":true
}
],
"actions":[
{
"type":"Action.OpenUrl",
"title":"View @{variables('varCardTitle')}",
"url":""
}
],
"$schema":"<http://adaptivecards.io/schemas/adaptive-card.json>",
"version":"1.2"
}

 

ericcheng_0-1633657688858.png

 

 

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

simflex
Regular Visitor

@eric-cheng,

 

Thank you so much for your incredible assistance.

I will try this in the morning and update you but just for context, the issue is not that it is erroring out.

The issue is when you copy it and try to paste it into the input box, nothing gets copied.

 

It acts as though the box is read only even though you can type into.

 

Hopefully, the reason is because of the code not being formatted correctly like you said.

 

I will update you tomorrow.

 

Once again, thanks a lot for your help.

 

just one last question about your code, this line is a bit confusing:

 

"type":"TextBlock",
"text":"Status for Work Item '@{outputs('Get_Work_Item_record')?['body/msft_name']}' has been updated to @{outputs('Get_Work_Item_Status_record')?['body/msft_name']}",
"wrap":true

 Do I need to copy entire code you provided as is or do I replace this line:

"text":"Status for Work Item '@{outputs('Get_Work_Item_record')?['body/msft_name']}'

with this line:

"text":"Status for Work Item '@{outputs('Get_Work_Item_Status_record')?['body/msft_name']}",
eric-cheng
Solution Sage
Solution Sage

Hi @simflex ,

 

Yes, when the JSON has invalid characters, you cannot paste it in.

 

You can try pasting it as is just to see if it works first.

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Sorry for the late response in accepting your solution Eric.

 

I had an emergency. Thanks a lot for your help

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,209)