How i make this tabs on extensions messages - botframework

i try to make an bot with similar layout
we can see it on microsoft teams doc HERE
I use this search example and get an result, but i dont know to make this "tabs" (Recents, Reports, inside image), anyone know or have example to how i make it?
i have only search input and result list, but i need tabs.
Thanks for all

These are actually called messaging extension search commands. Please try providing multiple commands by providing id's, title and other fields to render them as tabs.This documentation serves as best reference guide.

As tabs are only supported by search commands of message extension. To add tabs in your message extension, you would have to define the search commands in the manifest.json file of your respective project with id, title, and other required details.
"commands": [
{
"id": "searchQuery",
"context": [ "compose", "commandBox" ],
"description": "Test command to run query",
"title": "Search",
"type": "query",
"parameters": [
{
"name": "searchQuery",
"title": "Search Query",
"description": "Your search query",
"inputType": "text"
}
]
}
]

Related

Use AdaptiveCard form value of Input.Choiceset as a messageback on Submit button

I have an adaptive card which displays a list of pipelines in a choice set, I want to use the value of the selected pipelines as a messageback to teams on selecting the submit button. How can I access the value of the id of Input.Choiceset?
This is the snippet for Submit Action -
"actions": [
{
"type": "Action.Submit",
"title": "Execute",
"data": {
"msteams": {
"type": "messageBack",
"text": "" (Choiceset value here)
}
}
}
]
This is the Choiceset snippet -
{
"type": "Input.ChoiceSet",
"id": "pipelineSelect",
"choices": "${list}",
"placeholder": "pipelines"
}
There was a recent answer to a similar question that might help. Check out How to echo user select optionset from ChoiceSet using messageBack or imBack? . In addition, it might help to see more info on the CardAction class, as well as this blog post - see the "Card Action in Teams" section which even describes some more advanced messageBack options.

Google Drive comments API showing unresolved comments when there are none

I have a Google Doc that I am testing the Comments API with. I've created, then deleted or resolved many comments. It currently shows no comments in the UI. However, when I search Comments.Get API on a specific Comment ID for the file, I am returned one that is both unresolved and not deleted. See API response below:
{
"kind": "drive#comment",
"commentId": "commentID",
"createdDate": "2020-10-21T12:29:27.941Z",
"modifiedDate": "2020-10-21T12:29:27.941Z",
"author": {
"kind": "drive#user",
"displayName": "My Name",
"picture": {
"url": "My Picture"
},
"isAuthenticatedUser": true
},
"htmlContent": "Comment",
"content": "Comment",
"deleted": false,
"status": "open",
"context": {
"type": "text/html",
"value": "some text in my file"
},
"anchor": "kix.bj5cxfssg70z",
"fileId": "FileID",
"fileTitle": "My File",
"replies": []
}
Does anyone know why this might be happening. It's not a propagation issue (I hope) because I made all these changes to doc over an hour ago and still this is what I receive
This can happen if you create a comment via API, especially if you do it for a file that does not support programmatic anchoring
So the comment is somewhere, you can see that it was created if you browse the Drive Activity (both prgramamtically and form the UI), but you cannot see the comment itself because it was wrongly anchored somewhere outside of the visible range of the document.
I assume it is related to this bug. Comment on it to see if it gets reopened, or "star" the feature request to increase visibility.

Is there a way to use variables within URLs of slack workflows actions?

I'm setting up a workflow that takes in a text variable I'd like to use in a later link.
For example, I ask for "Api Name", and then want to send a message that both references the api name as well as constructs a url (e.g. http://swagger.io/docs/"Api Name")
The problem I encounter is the links come up in plaintext if I just try to include that url as plaintext example as above. If I use the editor to try and add a link, the variable is not available.
My next thought was to try and edit the workflow json to supply some markdown in there, but it looks like the richtext is constructed from a series of elements.
A link looks like this:
{
"type": "link",
"url": "https://swagger.io/collections/",
"text": "(Link)"
},
And a token looks like this:
{
"type": "workflowtoken",
"id": "<some uuid>==user",
"property": "",
"data_type": "user",
"style": null
},
If I merely make the link plaintext and try to append the variable after the prefix I get something like this:
{
"type": "text",
"text": "https://swagger.io/thing/",
"style": {
"unlink": true
}
},
{
"type": "workflowtoken",
"id": "<uuid>==text",
"property": "",
"data_type": "text",
"style": null
},
So maybe if we knew all the values "type" could be that would help?
Not sure where to go from here. Anyone have any suggestions?
Here is an answer from Slack Support Service:
We don't yet support Workflow variables outputted in links, I'm
afraid.
This is feedback we hear quite a bit so hopefully it's the something
the team will consider implementing in the future.

Slack API - Create a button that returns text from a variable

I am creating a Post.message to Slack through Python and want to add in a button feature. I want the button to provide a list of serial numbers that are represented by low2 = low["serials"]. This is the code I currently have and it adds the button to the slack message but when I click the button I get an error saying "Oh no, something went wrong. Please try that again." from slackbot. I saw posts saying that most people have to create a bot to fix their problems with buttons but if the button just has to read this variable I assume there is a way around that. Thanks for the help!
"fields": [
{
"title": "Amount Used:",
"value": low1,
"short": 'true'
},{
"title": "Distinct Device ID's:",
"value": out1,
"short": 'true'
},
{
"title": "Total Connection Time (hr):",
"value": data2,
"short": 'true'
}
],
"actions": [
{
"name": "game",
"text": "Serials",
"type": "button",
"value": "serials",
}
],
No, there is no way around it. You must create a Slack App (or "Internal Integration") in order to use buttons in your app. One reason is that you need to tell Slack what URL to call if someone clicks a button (your "Action URL") and that can only by configured as part of a Slack app. Check out this documentation on interactive messages for details.
Regarding your approach. A button will only display one value to the user. If your aim is to let the use choose from a list of serial numbers, you have two options in my opinion:
a) Create a group of buttons, one for each serial number
b) Use an interactive menu to create a drop-down menu for your list
I solved my problem by converting the confirm action button to display the values I wanted.
with open('Count_BB_Serial_weekly.json', 'r') as lowfile:
low = json.load(lowfile)
low1 = low["total_serials"]
low2 = low["serials"]
low3 = '\r\n'.join(low2)
Above is my script that imports the array and reads the values. Below I put the results into the "confirm" pop up button.
],
"actions": [
{
"name": "game",
"text": "Serials",
"type": "button",
"value": "serials",
"confirm": {
"title": "Serial Numbers",
"text": low3,
"ok_text": "Yes",
"dismiss_text": "No"
}
}],

Can't get FHIR message to decode

I am trying to integrate with a service that provides FHIR ImageStudy messages in JSON format. Once I have the JSON message I need to convert the message to XML.
I am using the FHIR-net-api found here, https://github.com/ewoutkramer/fhir-net-api I posted earlier and got help using this library to parse standard image study messages. Here is a link to my earlier post, FHIR JSON to XML decoding in BizTalk
The service I am connecting to has added some extensions to the image study message and when I attempt to parse it I get an error that the parser failed line 1 character 1.
My understanding is that if the extension are done correctly the FHIR-net-api library should be able to parse the JSON to XML. Is this correct?
Can anyone identify if the test message below is compliant to the FHIR standard, if not what is wrong with it? I have shortened the message to only contain a single image study but the service returns multiple in a bundle. I have also removed identifying information.
{
"resourceType": "Bundle",
"total": 15,
"entry": [
{"resource": {
"resourceType": "ImagingStudy",
"id": "LALA.e1e6683d-f6d9-e311-ae0e-0050568f64",
"contained": [
{
"resourceType": "Organization",
"text": {"div": "LALA"},
"name": "LALA"
},
{
"resourceType": "Procedure",
"id": "Procedure1",
"code": {"coding": [ {
"code": "RAD-HANB",
"display": "HANDS BIL"
}]}
}
],
"extension": [ {
"url": "https://someplace.org/fhir/extensions/imagingstudy-examstatus",
"valueString": "Finalized"
}],
"started": "2013-12-03T12:30:00-08:00",
"accession": {"value": "A12345BH"},
"procedure": [{"reference": "#Procedure1"}],
"series": [ {
"modality": {
"system": "http://www.dicomlibrary.com/dicom/modality/",
"code": "CR"
},
"bodySite": {"code": "UEX"},
"instance": [
{"title": "DiagnosticReport"},
{
"title": "DiagnosticImage",
"content": [
{
"url": "/fhir/Patient/91111/ImagingStudy?_query=imageUrl&_id=6683d-f6d9-e311-ae0e-0050568f6477&-mrn=12345T&-organization=lala&accession=tester&-status=F",
"title": "Something"
},
{
"url": "/fhir/Patient/9111111/ImagingStudy?_query=html5Url&_id=e1e6683d-f6d9-e311-ae0e-0050568f6&-mrn=123345&-organization=lala&accession=testing&-status=F",
"title": "HTML5"
}
]
}
]
}]
}}
]
}
I suspect that you got a message like this: Error parsing XHTML: Incorrect document syntax. at line 1 row 1. source = " at line 8 col 13
That's what I get once I clean up the instance a little bit to include only the resource and not the wrapper from the Bundle and check it against http://fhir2.healthintersections.com.au/open/.
The first issue is that the narrative inside your div tag is not valid. It needs to look like this:
"div": "<div>LALA</div>"
However there are a bunch of others. The narrative is missing status. Narrative isn't actually allowed on contained resources, you're missing a bunch of mandatory elements, etc. Just go to the link above and paste your JSON into the "upload" box at the bottom of the page and select "validate". That will give you a full report of the issues. (Not all of those will necessarily impact your ability to convert between JSON and XML, but presumably you'll want to fix them regardless.)

Resources