cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5745
Views
5
Helpful
19
Replies

email contents to be posted into webex space channel

dupa75
Level 1
Level 1

Hello

Im trying to do the following and Im not exactly sure how to proceed and if it is even possible to do.

 

i want the contents of email that comes from blah@example.com to be posted into a webex teams space channel, every time.

 

Any help is much appreciated.

Thank you!

19 Replies 19

Abdul Rahman
Cisco Employee
Cisco Employee

https://apphub.webex.com/applications/outlook-alerts-for-microsoft-office-365-59864-76380

Outlook Alerts for Microsoft Office 365

Stay on top of your inbox with notifications from the Outlook Alerts for Microsoft Office 365 bot for Webex.

Hi, 

 

I have not test it but there's a Webex Connector in Microsoft Power Automate. Since you mentioned you company has O365 that could be a good option for you.  Webex | Microsoft Power Automate

I confirm that using power automate works very well for that. 

I use it for this purpose since many month. 

Fantastic.

Thanks for the reply!

dstaudt
Cisco Employee
Cisco Employee

Right...the missing piece of the puzzle is how will you get your code to access/retrieve the subject/sender/text of the email?

What email system are you using?

If you are coding in Python (per the linked learning lab above),  and using Exchange, then you'll need to look for things like this: https://stackoverflow.com/questions/288546/connect-to-exchange-mailbox-with-python

 

Hello

Thanks for your reply.  I have written the code in python. Im able to post a message in the room once the code is ran. Im just stuck on how to get the code to run when an email (o365) is received and at same time past the body contents of the email instead.

Hi,

I you please share the code with me or you can share mw the you git link to access the code

I'd run the script periodically via cron or the task planner.

 

Otherwise, you'd need a persistent connection in order to receive the push notifications. IMAP could handle that, O365 EWS clients as well (think of your mail application utilizing these protocols).

Oh I can have the script run every 1min or 5min or whatever, just not sure how to run it so it checks a particular mailbox for anything new.

Cole Callahan
Cisco Employee
Cisco Employee

@dtibbe , weren't you working on something similar?



Response Signature


Yeah, I've created a small PHP script (bot token) that accesses mail account via IMAP, grabs unread mails, does some parsing/formatting and pasts the contents to a direct space. The script is scheduled via cron and runs every 5mins

 

So the job itself can be done quite easy as @dstaudt already said. Assuming that you have the language of your choise and knowing how to read mails from an account and checking if they should be sent to the space, the Webex bot part will be invoking the Create a message endpoint using the bot's token. If the bot is member of a group space it may post its messages there, or you may specify a user id or user email address if you want the bot to post the message to a direct space.

I dont have access to the email account that is being used to send the message as it is from an outside source ...  it is being sent to a group DL that Im part of.  Id like to take those emails and pretty much pipe the content to the webex space also.

If you do not have access to the mail, how do you want to process it...?

 

But as you said, you're part of the DL, so you will receive the mail in your personal inbox. Your bot script may access that as well and could paste it to the space.

Or you may create a dedicated mailbox for that and ask the DL owner to add that address as well. So the bot can delete the mails from there as soon as it has processed it without deleting it from your mail box..

Hello

Thanks for your response.  Yes a dedicated mailbox for this would be preferred. Not sure how to go about having the email deleted after it is posted in the space. I tried "Outlook Alerts for Microsoft Office 365" but it keeps posting in the space until the email is read.

dstaudt
Cisco Employee
Cisco Employee

The Webex part should be pretty easy, i.e. use a Webex bot to post messages into a space using the REST API.  This learning lab covers the basics: https://developer.cisco.com/learning/lab/collab-webex-chatops-bot-itp/step/1
The part you will likely need to figure out is how to receive the email.  That will depend mostly on the email service (POP/SMTP/Exchange/GMail?), the APIs available for receiving/retrieving/marking read those emails, and your development language/framework/platform.

For something simple/proof-of-concept, you might be able to accomplish what you need without coding by using a service like IFTTT/Zapier/WebMethods.io, etc.

 

Thanks for the reply.  I created a bot on the webex side of things, just curious on how to get it to work within the chat space and email.

Im curious if using the app "Outlook Alerts for Microsoft Office 365" would work?   I dont necessarily want to to depend on my email account to do it though.

"Outlook Alerts for Microsoft Office 365" is not going to do what I want.

Hi there, did you ever find an acceptable solution?

I came from using Slack, and that tool allows you to create custom email addresses for a channel.  You then add that contact to relevant distribution groups and you're done.  I used them to send critical alerts to monitored channels.

I'm looking for something similar and it may be similar to what you're seeking as well.  Hence the request for update.

Cheers!

@dupa75 the only pre-built bot we have for moving email conversations to Webex spaces is the email2teams bot: https://apphub.webex.com/applications/email2teams-cisco-systems-60469 . It will not post the contents of the email to a space all, it will just create a space with the participants of the email. It might help you.