<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Webex ChatBot with Outlook in Webex for Developers</title>
    <link>https://community.cisco.com/t5/webex-for-developers/webex-chatbot-with-outlook/m-p/4695500#M1566</link>
    <description>&lt;P&gt;Can you provide some details on how this bot is put together and is intended to work?&amp;nbsp; Where is the bot process/script running (cloud, server, your PC?)&lt;/P&gt;
&lt;P&gt;If the bot is not running on your PC, I'm not sure I understand how the Outlook email creation code is supposed to get executed (on your PC?)&amp;nbsp; Assuming you are using the Action.Submit&lt;BR /&gt;If the bot is running somewhere else (a server, in the cloud, etc.), then I don't think your Python code (which probably needs to run on your local PC) running on the bot's host is going to work.&lt;BR /&gt;The main challenge is that the adaptive card, as rendered inside the Webex client, is not going to be able to run arbitary code (i.e. your email creation code.)&amp;nbsp; A card action can submit JSON data to the bot application, which can then do something, but it can't execute Python code.&lt;BR /&gt;Adaptive card actions can, howevever, launch URLs.&amp;nbsp; It seems Outlook has some &lt;A href="https://stackoverflow.com/questions/39970805/how-to-create-a-html-button-that-opens-outlook-application" target="_self"&gt;facility for being cross-launched&lt;/A&gt; from browsers via protocol handler.&amp;nbsp; Note sure how/if the Webex client will handle a 'mailto:' protocol (vs. the 'https:' protocol), but it might 'just work' (or it might launch an annoying interim/empty browser window, or it might ignore non https protocols...)&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2022 17:20:56 GMT</pubDate>
    <dc:creator>dstaudt</dc:creator>
    <dc:date>2022-09-28T17:20:56Z</dc:date>
    <item>
      <title>Webex ChatBot with Outlook</title>
      <link>https://community.cisco.com/t5/webex-for-developers/webex-chatbot-with-outlook/m-p/4645417#M1565</link>
      <description>&lt;P&gt;Hi, i am Julia, a beginner python developer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, i was trying to add an action to a button on my starting card, this button should open an outlook window with an edited email. The code that should open an outlook window is working with no problems. But, when i add this code to a function or a class in my code with the button of Webex bot card i have multiples errors, with classes and functions, and the most of the times, the bot run, open the outlook window and just stop, or continue to running but if you press the button nothing happens.&lt;/P&gt;&lt;P&gt;This is my last code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;logging&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;win32com.client &lt;SPAN&gt;as &lt;/SPAN&gt;win32&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;webex_bot.models.command &lt;SPAN&gt;import &lt;/SPAN&gt;Command&lt;BR /&gt;log = logging.getLogger(__name__)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;class &lt;/SPAN&gt;TesteEmail(Command):&lt;BR /&gt;    &lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;__init__&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;&lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;BR /&gt;        &lt;SPAN&gt;super&lt;/SPAN&gt;().&lt;SPAN&gt;__init__&lt;/SPAN&gt;(&lt;BR /&gt;            &lt;SPAN&gt;command_keyword&lt;/SPAN&gt;=&lt;SPAN&gt;"email"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;help_message&lt;/SPAN&gt;=&lt;SPAN&gt;"Envie seu chamado para a T.I!"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;card&lt;/SPAN&gt;=&lt;SPAN&gt;None,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;        )&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;class &lt;/SPAN&gt;Chamado(Command):&lt;BR /&gt;    &lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;__int__&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;recipient&lt;SPAN&gt;, &lt;/SPAN&gt;subject&lt;SPAN&gt;, &lt;/SPAN&gt;text&lt;SPAN&gt;, &lt;/SPAN&gt;outlook):&lt;BR /&gt;     &lt;SPAN&gt;super&lt;/SPAN&gt;().&lt;SPAN&gt;__init__&lt;/SPAN&gt;(&lt;BR /&gt;        &lt;SPAN&gt;help_message&lt;/SPAN&gt;=&lt;SPAN&gt;"Envie seu chamado para a T.I!"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    )&lt;BR /&gt;    outlook = win32.Dispatch(&lt;SPAN&gt;'Outlook.application'&lt;/SPAN&gt;)&lt;BR /&gt;    self = outlook.CreateItem(&lt;SPAN&gt;0&lt;/SPAN&gt;)&lt;BR /&gt;    self.To = &lt;SPAN&gt;"person1@gmail.com"&lt;BR /&gt;&lt;/SPAN&gt;    self.Subject = &lt;SPAN&gt;"Auto test mail"&lt;BR /&gt;&lt;/SPAN&gt;    self.HtmlBody = &lt;SPAN&gt;"""&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    #html code here&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    """&lt;BR /&gt;&lt;/SPAN&gt;    self.Display(&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I will be so glad if someone could help me to make it work, and just open the outlook window when the user press the button. Thank you !&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 20:18:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/webex-chatbot-with-outlook/m-p/4645417#M1565</guid>
      <dc:creator>juliaSilva</dc:creator>
      <dc:date>2022-07-06T20:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Webex ChatBot with Outlook</title>
      <link>https://community.cisco.com/t5/webex-for-developers/webex-chatbot-with-outlook/m-p/4695500#M1566</link>
      <description>&lt;P&gt;Can you provide some details on how this bot is put together and is intended to work?&amp;nbsp; Where is the bot process/script running (cloud, server, your PC?)&lt;/P&gt;
&lt;P&gt;If the bot is not running on your PC, I'm not sure I understand how the Outlook email creation code is supposed to get executed (on your PC?)&amp;nbsp; Assuming you are using the Action.Submit&lt;BR /&gt;If the bot is running somewhere else (a server, in the cloud, etc.), then I don't think your Python code (which probably needs to run on your local PC) running on the bot's host is going to work.&lt;BR /&gt;The main challenge is that the adaptive card, as rendered inside the Webex client, is not going to be able to run arbitary code (i.e. your email creation code.)&amp;nbsp; A card action can submit JSON data to the bot application, which can then do something, but it can't execute Python code.&lt;BR /&gt;Adaptive card actions can, howevever, launch URLs.&amp;nbsp; It seems Outlook has some &lt;A href="https://stackoverflow.com/questions/39970805/how-to-create-a-html-button-that-opens-outlook-application" target="_self"&gt;facility for being cross-launched&lt;/A&gt; from browsers via protocol handler.&amp;nbsp; Note sure how/if the Webex client will handle a 'mailto:' protocol (vs. the 'https:' protocol), but it might 'just work' (or it might launch an annoying interim/empty browser window, or it might ignore non https protocols...)&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 17:20:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/webex-chatbot-with-outlook/m-p/4695500#M1566</guid>
      <dc:creator>dstaudt</dc:creator>
      <dc:date>2022-09-28T17:20:56Z</dc:date>
    </item>
  </channel>
</rss>

