How to attach files like excel,word ,image,pdf etc to Hangouts chat on button click - hangouts-chat

I am trying to send a object as response from python to Hangouts chat which in turn should be converted to excel for downloading
As of now i am just returning a html content as response with hard coded value

Related

Cannot Send Video Files Using Twilio's Whatsapp API

I am Currently on a Project Which Captures a Video Detects for a Light Source in it and if The source Exists The Video gets Recorded and saved in cloudinary.com,
What I did after was i passed the cloudinary url into the media_url of twilio create function,
There are no error codes in the response, the status is 'queued' and The dashboard at twilio shows nothing.
Where Would The Problem Be?

How to send media files on whatsapp programmatically using click to chat feature?

I have to use whatsapp's click to chat feature for automating the process of sending messages to unsaved numbers. I am currently using selenium to automate the process. I am able to send text messages only for now. I was wondering that it might be possible to send other media files as well like images and videos.
There are 2 unused parameters in my url of click to chat feature, "source" and "data". I thought using these might enable me to send media files but I Haven't been able to do it yet.
Example URL for one of my click to chat messages:
https://web.whatsapp.com/send?phone=phoneNumHere&text=Hi&source=&data=
Can anyone confirm that either its possible or not. If its possible what would be the right way to do it?
Thanks
Similar question: Whatsapp Automated Bot not able to search in WhatsApp Contact List
Send images, videos and docs using Selenium:
//To send attachments
//click to add
driver.findElement(By.cssSelector("span[data-icon='clip']")).click();
//add file path
driver.findElement(By.cssSelector("input[type='file']")).sendKeys("FilePath");
//click to send
driver.findElement(By.cssSelector("span[data-icon='send-light']")).click();
I know it's too late, I just have to add that Whatsapp Web and Whatsapp Desktop accept paste inputs, thus if you can get your picture to the memory (I did it with VB.net took 5 mins to accomplish after a bit of googling) you can just send a paste order and it'll load it in and require and ENTER send key from you.
Part1: Sending messages to unsaved contacts
Sending media to unsaved numbers is quite a difficult task but not impossible. You can surely find XPath by text.
Part2: Yes media can be sent to contacts. I have done that in my project link : https://github.com/shauryauppal/PyWhatsapp. By using PyAutoIt you can send Pictures, PDF, Videos to the selected contacts.
Since uploading part is not the automation of web browser we auto windows using AutoIt and select the path of image/video/file to send to the user.
autoit.control_focus("Open","Edit1")
autoit.control_set_text("Open","Edit1",(PATH_OF_IMAGE_TO_SEND) )
autoit.control_click("Open","Button1")
This is just the crux of the implementation. Do refer my repo in case of more understanding.
PS: Don't forget to star repo or give credits.
Check answer Link for more info, where to download AutoIt from.
Coding Working Fine.
//To send attachments
//click to add
driver.findElement(By.cssSelector("span[data-icon='clip']")).click();
//add file to send by file path
driver.findElement(By.cssSelector("input[type='file']")).sendKeys("FilePath");
//click to send
driver.findElement(By.cssSelector("span[data-icon='send-light']")).click();
I was having the same issue but right after fixing it, I made a python wrapper so that it helps more people having the same issue.
In case you're interested to explore more about the wrapper, here is a link
https://github.com/Kalebu/alright
Here is how to send a message to media files and message to unsaved contacts
>>> from alright import WhatsApp
>>> messenger = WhatsApp()
>>> messenger.find_user('255-74848xxxx')
>>> messenger.send_message("I wish you a Merry X-mass and Happy new year ")
>>> messenger.send_picture('path-to-image',"Text to accompany image")
Sending to Multiple unsaved contacts
>>> numbers = ['2557xxxxxx', '2557xxxxxx', '....']
>>> for number in numbers:
messenger.find_user(number)
messenger.send_message("I wish you a Merry X-mass and Happy new year "

Bind youtube event to Hangout on air

Please, help me out. Here is an outline of what I am trying to do.
1) Create an event
2) Bind it to a stream
3) Bind the event to Google Hangouts on Air
4) Get link to Hangouts
5) Invite participants
All this I want to create via API.
I manage to create event and bind it to a stream but it is not Hangout on Air type.
With new LiveStreaming API I can create an event and bind it to a stream, which I did but I can nowhere see options to bind this newly created event to the Hangouts on Air.
However, I can easily create it via Youtube console (choosing 'Quick' type) and it will prompt me to open a Hangout app.
Is there anyway to do the same steps via API and get a hangout link?

Audio sending via Telegram Bot seems like document

I'm building a telegram bot. When i try to send audio using the sendAudio method it sends like a downloadable file instead of music(playing in audio player etc.).
Example of what i send:
{"title":"Blabla","performer":"Blabla","audio":"SOME_FILE_ID"}
If I don't send title and performer it sends like a voice record.
If I send title and performer it sends like a document.
But I need to send it like a music.

How do I post in facebook a big image on a friend's timeline without using sdk feed dialog

I have an app that lets the user create a custom-made greeting card (a big image) and send it to a facebook friend who has their birthday / another occasion on that day.
I want to allow my user to post the generated greeting card image on the other friend's timeline.
Since feb 2013, developers are not allowed to post on other user's wall using /feed (stream.publish), the documentation states it is only allowed using the feed dialog (sdk pop-up).
How do I allow a user to post a big image on a friend's timeline from an iOs app without using the sdk's send dialog?
Due to the Recent Changes of Facebook Graph API you can't do this anyway without using the Feed Dialog .