I want to select a pdf file from the bot and send it through a Web Api but I have not obtained any documentation, if you could support me with this it would be very helpful.
Thank you.
You can send a PDF, but you cannot send a local fie. It has to be uploaded somewhere or encoded. So, sending with activity and contentUrl of either data:image/png;base64,${imageBase64} or https://www.example.com/path/to/file.pdf
Please see more info explained in this comment. Also be aware that different channels behave differently with attachments (See end of conversation in that same thread).
Edit: Actually, the change to be able to send a binary is currently in the works. Please watch here.
Related
I am developing a chatbot with Amazon Lex and I want to collect a description of a customers issue, save it to a variable, and send it through email. How can I implement this functionality?
I had a similar problem that I was able to solve by creating a Lambda function to access the user's inputTranscript.
You basically provide the Lex Bot with some sample utterances (which usually will capture part of what the user has said) and in your Lambda function, access the the event.inputTranscript. This is the last thing the user has typed exactly as they typed it.
My project was written in NodeJS so I used Nodemailer and the Gmail API to send the inputTranscript in an email. This is the video tutorial I followed at the time. It'll show you how to set everything up :)
If you are using Python, you can use the built-in library smtplib to send emails. Although I'm sure there are other options as well.
Hope this helps!
I'm building an app that allows the user to input a Teams channel webhook connector URL for notifications.
I want to be able to do some basic validation on the URL to maximize the chance that the user's input is valid.
From what I can see on the few M365 tenants I have access to, the webhook appears to be in the format of:
https://tenant-name.webhook.office.com/webhookb2/some-guid/IncomingWebhook/some-guid/some-guid
But I'm not sure if that'd be the case for all tenants, and I believe at some point Microsoft changed this format too, as I have seen this one before:
https://outlook.office.com/webhook/some-guid/IncomingWebhook/some-guid/some-guid
So I'd need to have all versions accounted for.
I can't seem to find any documentation on this. If by any chance someone has worked on this and can provide some info, it'd be greatly appreciated.
We have verified it now in our tenant and the Webhook URL is similar to the one which you have shared first:
https://tenant-name.webhook.office.com/webhookb2/some-guid/IncomingWebhook/some-guid/some-guid
So you can use this format.
Reference link:
https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook
We want to be able to embed an audio file in a Slack chat via the web API.
So far I managed to files.remote.add but that's just an external link.
Then I tried files.upload and share it to a channel, it does embed and play right inside Slack, but for us it's a suboptimal solution, as users can easily download the file, which is against our requirements.
Is there another way to achieve this?
PS: I've read almost all the documentation, there doesn't seem to be an audio or media block type, although I've seen examples that cite a file block type which is neither documented in the API and it's not defined in Bolt. (at least there are no type definitions for it for typescript)
It's not currently possible to embed a media player (audio or video) via the API. We're constantly tuning our APIs, if you have a specific use case in mind, would you mind writing in to feedback#slack.com and we'll get it logged. Thank you!
I'm currently writing an WebApi endpoint that is to accept image uploads with associated Descriptions and titles. I want to be able to send this information up in one post rather than sending the image and then the meta data in a subsequent call.
The client sending this is a mobile application written in Xamarin.
Searching the internet I struggled to fine any direction to doing this kind of thing although I'm sure it's possible.
Any help or pointers would be appreciated.
USE CLOUDINARY
upload image to cloud with easy api like
https://res.cloudinary.com/demo/image/upload/w_150,h_150,c_thumb,g_face,r_20,e_sepia/l_cloudinary_icon,,x_5,y_5,w_50,o_60,e_brightness:200/a_10/front_face.png
The DotNet SDK is here
and a tutorial to add metadata along
I am writing a Xamarin implementation of a bot channel using the DirectLine API and want to send my current location to the BotBuilder-Location plugin in a similar way to what Facebook Messenger does.
What format message do i need to send at the location prompt to get it to pick up my current location?
I should have looked at the source code before posting. It seems that there is a special implementation for facebook channel so its not possible to 'simulate' facebook however with some slight tweaking of the location component you could get this to work but it is not possible using the component as is.