Send located File in oneDrive to user using bot composer - bots

Hi guys(I hope you are doing well),
I have a file (.csv) located in OneDrive and want send it to user using bot composer. I used Adaptive Card in my bot but when I write the address of my file (located in OneDrive) in url of Adaptivecard it doesnt work. can you please help me how can I fix it ?
Thanks

Related

In bot framework composer in Teams channel is there a way to determine file size of an uploaded file?

Bot framework composer in web channel gives you file sizes as an array in turn.activity.channelData.attachmentSizes (these don't always line up with the array order of the attachments but it's better than nothing).
However in Teams channel there's no attachment detail other than the url, some download url involving an id, and what the file says its extension is.
In response to this suggestion I tried https://<sharepointsite>/_api/web/getFileByServerRelativeUrl('/path/to/filename.ext')/Properties but it returned 403 Forbidden.
I'm wondering if Graph API is the only way (I'd rather not have to get users to agree to that) or if there's some rest api that can gather it for me?

How to serve an ics file through NodeJS API in a way that user can subscribe using URL?

So I have my ics file in Google Cloud Storage and I would like to serve it through my API so I don't have to make the ics file public. However, I am not sure what is the right way to do that so that the user can put the link to my api call in their Google Calendar as a webcal link to subscribe to the calendar.
Is this possible or do I have to provide a direct link to the ICS file for the user to be able to subscribe to the calendar? If it is possible, how would I go about serving the file in NodeJS?
Example:
https://storage.googleapis.com/example/calendar.ics would be able to be served through https://api.com/example/userID/calendars
webcal://api.com/example/userID/calendars would then be used in the Google Calendars to subscribe to the calendar
So I had two options available to me:
Change the access to the ICS file to public then share that URL to the user. However, this method would not allow me to dynamically change the file in the case that I would want to delete or change the file name.
Serve the ICS file through my API - the method I had originally asked about in the original post.
So for method 2, I basically just had to do gcs.bucket('bucket_name').file('file path to ics file in bucket').download((error, content) => res.send(content))

How do make a telegram bot to read a pdf file sent by user and extract data from it?

I have been checking on forums(stack overflow, git, Telegram APIs) to check how could I extract contents from a pdf file which is sent by user? I have created Telegram bot using python's python-telegram-bot library and as an efforts to try to solve my question, I had checked links eg: https://pypi.org/project/python-telegram-bot/ and https://python-telegram-bot.readthedocs.io/en/stable/index.html in search of functions but couldn't find anything there.
I did find methods to send a pdf file to user from bot and send a file from user to bot but there is nothing available where BOT can extract contents of pdf sent by user. Will be grateful if experts could guide me here.
python-telegram-bot is a library that provides a wrapper for the Telegram Bot API. As such, it provides all the methods from the API as well as auxiliary functionality to build chat bots in general, including downloading files sent by users. Extracting contents from a received PDF file after download is however far beyond the scope of this library.
Of course there are other libraries that provide such functionality and that can be used in combinantion with python-telgram-bot. See e.g. camelot.
Disclaimer: I'm currently the maintainer of python-telegram-bot.

settings in slack that gives you access to the bot [Zapier]

I am new to Zapier. There is some steps in Zap that integrates it with Slack. When someone pushes files from Slack, Slack Bot sends message like "XYZ files have been successfully uploaded to Encompass" but actually the files are not getting uploaded in Encompass.
I am wondering if the Slack Bot sends message but why files are not getting uploaded in Encompass.
Could somebody helps me with this issue? Do I need to do anything in Slack setting to make that work?
But I am not able to see settings in Slack, I can see just Administration.
Thank you in advance! I would really appreciate the help!
I am in need to fix it immediately.

Download links from email

I am trying to download pdf available in email as hyperlinks. The reason I need this is that I get emails with several such links that needs to be downloaded and saved on a location.
Is there a way this could be automated. Tried checking out ways to do it using python or VBA but no viable solutions so far. This is O365 that I need help on and the hyperlink is embedded in the text highlighted in blue..
You should check the smtp,smtpd modules for a direct interaction with the server.
In the smtp server module you could download the mail locally and extract the info directly and locally, it's useful if you want to keep a backup of your mail, and keep clean your inbox.
In the smtp client module, you could read the email, save it as a object and extract the elements with the mime module, the extract (file) should be translated to a file object and/or saved in de pc as a file with it's extension.
Note: you should look in the internet for the configuration of your mail service to connect in the correct way and the correct sequence of steps, because some servers need a validation of the connection before login and others after the login.

Resources