How to send an Attachment in Google Chat via Bot/ Webhook - google-chat

My organisation is using Google Chat for internal communication. In one of the group in the app I am sending the report of daily automation test run using webhook. Currently the report consist of only text message containing the pass/ fail count.
But I want to send the html report as well with that. I could not found any source which tell the information about how to send the attachment in the bot messages in Google chat.
Please help me if someone knows how to send the attachment report using Google Chat Bot or Webhook.

Per documentation, Bots have limited message types they can send. (Only simple text, or Cards)
I would suggest sending a link to download the report, which is feasible with the bot. See Including links in message text

Related

How to send a PDF attachment using Peoplesoft AWE while sending Email notification

How to send a PDF attachment using Peoplesoft AWE while sending Email notification. Im trying to use the AWE features to send Email Notification once the request is approved. Along with the Email notification i should also send a generated PDF which gives information about the changes the Emplid, Salary changes and related infos. I am able to do this using the BI Publisher report generation and People code SendMail function but im looking for AWE options to send the attachment
I tried the custom code to send attachments after approval and it worked. But im not able to find any documentation using AWE to send PDF attachments. Any Suggestions will Help

How to send Telegram Message using Google Apps Script?

I have a basic Google App Script which is connected to a Google Sheet and sends a birthday reminder email on the day of someones birthday.
What I would like to do, is send an automated message on Telegram using the same data whilst inside of a group chat.
I don't want the message to come from a Bot account, but rather my own account so that it looks like I have genuinely sent the message myself. :)
Can this be done?
I have searched the web without success. Everything seems to be centered around creating a Bot account.

How telegram bot knows where to respond?

I am using telethon and I have a question that how telegram knows where to send the request?
I have created a bot on telegram. When the user sends a message to the bot then how telegram knows where to redirect that message. I run my program in my local and also on a server. But in the code, we don't mention anything about the server. But the program is working fine on it also.
Need to understand the flow.
Telethon uses what’s called MTProto to communicate with Telegram servers. It connects just like an actual client would (like TDesktop or Webogram, for instance). Once the connection is made, instead of using a phone number, the authentication is made with the bot token. Then, everything else is standard procedure: Ask Telegram for any new message and Telegram responds with all the messages people sent to the bot or to groups your bot is in (if you have that enabled through BotFather). To cut down on traffic, if there’s an open connection, Telegram may send updates automatically.
That’s the general process flow. For more in-depth explanation of how MTProto works, all the technical information is available on their website. The portion about updates is here: https://core.telegram.org/api/updates
Every handler have an arg, i named it here event , e.g:
#client.on(events.NewMessage)
asynce def handler(event):
This event have all information in it, text of message, message id and etc.

Sending voice command to telegram bot

Is there any way to send a voice command to Telegram bot?
I want to send voices to my bot and use google API to convert them to text and then translate and send back.
In order to do this, I need to get the voice first. Is there any way to send the voice to the bot?
You can find file_id from Voice update, and then obtain download path via the getFile method.
This object represents a file ready to be downloaded.
The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>.
In above instance, you can download from https://api.telegram.org/file/bot485609210:mySecret/voice/file_178.
You can send a voice message to the bot, which would be stored on your server. Than convert it to text using Google API, translate and send back. Do you want to send it back as text?

automate sending messages in google hangouts from unix server

Is there a way that I could automate sending messages to a group in google hangouts using its API from my UNIX box? I am trying to automate a sql query which in turn sends the result as instant message to google hangouts.
Google Hangouts does not currently have an API for chat. You can star this feature request to show your interest though.

Resources