03-29-2022 10:26 AM
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!
06-08-2023 08:57 AM
https://apphub.webex.com/applications/outlook-alerts-for-microsoft-office-365-59864-76380
04-04-2022 05:59 AM - edited 04-04-2022 06:05 AM
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
02-09-2023 12:43 PM
I confirm that using power automate works very well for that.
I use it for this purpose since many month.
02-09-2023 12:54 PM
03-29-2022 06:09 PM
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
04-01-2022 12:45 PM - edited 04-01-2022 12:46 PM
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.
08-26-2023 06:01 AM
Hi,
I you please share the code with me or you can share mw the you git link to access the code
04-02-2022 09:22 AM
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).
04-04-2022 05:18 AM
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.
03-29-2022 12:06 PM
@dtibbe , weren't you working on something similar?
03-29-2022 12:53 PM
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.
03-29-2022 12:58 PM - edited 03-29-2022 01:08 PM
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.
03-29-2022 01:05 PM
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..
04-01-2022 12:42 PM
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.
03-29-2022 10:46 AM
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.
03-29-2022 12:10 PM
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.
03-29-2022 12:26 PM
"Outlook Alerts for Microsoft Office 365" is not going to do what I want.
02-08-2023 04:42 PM
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!
04-07-2022 05:45 AM
@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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide