# RASA CHAT BOT with API Integration and return HTML Dataframe

**URL:** <https://forum.rasa.com/t/rasa-chat-bot-with-api-integration-and-return-html-dataframe/30422>\
**Category:** Rasa Open Source\
**Created:** [June 19, 2020, 4:09pm UTC](https://forum.rasa.com/t/rasa-chat-bot-with-api-integration-and-return-html-dataframe/30422 "2020-06-19T16:09:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarseli](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@amarseli](https://forum.rasa.com/u/amarseli)\
**Post date:** [June 19, 2020, 4:09pm UTC](https://forum.rasa.com/t/rasa-chat-bot-with-api-integration-and-return-html-dataframe/30422/1 "2020-06-19T16:09:03Z")

</div>

Hi Team, Am new to RASA Chat bots but I have experience in basic python coding that are required for machine learning.

**My Requirement** :: I have an REST API which has session token based authentication. I have written basic python code and it is successfully working in a stand alone ANACONDA Jupiter notebook. **Purpose of API :** I have defined a method and if you pass a Purchase Order Number then it returns a HTML table of purchase order info in a seperate dataframe which contains embedded hyperlinks

**CHAT BOT Input** I will just send greet - Hi, How are you? Bot : Next : I will ask chat bot **Can you provide me PO Status** Me : PO Number

Then chatbot should call actions and it should call my Python API file and it shoud return the DATA FRAME as an output

File “c:\programdata\miniconda3\lib\site-packages\rasa\_sdk\endpoint.py”, line 102, in webhook result = await executor.run(action\_call) File “c:\programdata\miniconda3\lib\site-packages\rasa\_sdk\executor.py”, line 389, in run if not events: File “c:\programdata\miniconda3\lib\site-packages\pandas\core\generic.py”, line 1479, in **nonzero** f"The truth value of a {type(self). **name** } is ambiguous. " ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Am testing in Command Prompt and am getting below errors as attached 2 files.

RUN ACTIONS FILE. log and CHAT BOT DEBUG LOG [RASA DEBUG LOG.txt](https://forum.rasa.com/uploads/short-url/sutojM2HsHGQR0AC3AHd6Ua7II0.txt) (6.3 KB)

[RASA RUN ACTION LOG.txt](https://forum.rasa.com/uploads/short-url/rr1F8Bjpugj2jkxRwedSRPNT8JJ.txt) (6.3 KB)
