# Migrating dialogflow agent to Rasa

**URL:** <https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452>\
**Category:** Rasa Open Source\
**Created:** [September 27, 2018, 12:42pm UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452 "2018-09-27T12:42:07Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![savitha\_1055](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@savitha\_1055](https://forum.rasa.com/u/savitha_1055)\
**Post date:** [September 27, 2018, 12:42pm UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/1 "2018-09-27T12:42:07Z")

</div>

I have trained bot in dialogflow I want to migrate that bot to Rasa but I am not able to generate training data which will be understandable to Rasa… I have all .json files related to dialogflow agent how to convert that files to rasa understandable files

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [September 27, 2018, 3:59pm UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/2 "2018-09-27T15:59:53Z")

</div>

You can just pass those files as normal to rasa\_nlu: [https://rasa.com/docs/getting-started/dialogflow/](https://rasa.com/docs/getting-started/dialogflow/)

---

<div class="post-metadata">

**Author:** ![srikar\_1996](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@srikar\_1996](https://forum.rasa.com/u/srikar_1996)\
**Post date:** [September 29, 2018, 12:30pm UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/3 "2018-09-29T12:30:51Z")

</div>

I found this tutorial very useful.

> **[How to Migrate your Existing Google DialogFlow Assistant to Rasa](https://rasa.com/blog/how-to-migrate-your-existing-google-dialogflow-assistant-to-rasa/)**
>
> Learn the step-by-step process of migrating an existing DialogFlow assistant to Rasa and the main reasons why developers choose Rasa over hosted platforms.

---

<div class="post-metadata">

**Author:** ![savitha\_1055](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@savitha\_1055](https://forum.rasa.com/u/savitha_1055)\
**Post date:** [October 1, 2018, 7:40am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/4 "2018-10-01T07:40:02Z")

</div>

Thank you so much @srikar_1996 same document i was following. done with Rasa NLU part

but one thing, I have responses in dialogflow as below …then how to include this response in domain.yml file as templates.

{ “widgetType”: “imageCarousel”, “digital\_service”: [{ “image”: “1.png” }, { “image”: “https:/2.png” }, { “image”: “https:3.png” }, { “image”: “5.png” }] }

can you help me

---

<div class="post-metadata">

**Author:** ![srikar\_1996](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@srikar\_1996](https://forum.rasa.com/u/srikar_1996)\
**Post date:** [October 1, 2018, 10:31am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/5 "2018-10-01T10:31:24Z")

</div>

Hi,

Under the templates in your utter instance add it as an image file.

templates:

utter\_show\_image:

- image: Pass the image url here

---

<div class="post-metadata">

**Author:** ![savitha\_1055](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@savitha\_1055](https://forum.rasa.com/u/savitha_1055)\
**Post date:** [October 1, 2018, 10:37am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/6 "2018-10-01T10:37:32Z")

</div>

I want to pass object as custom payload in response can i pass like this utter\_show\_data:

- data: {}

---

<div class="post-metadata">

**Author:** ![srikar\_1996](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@srikar\_1996](https://forum.rasa.com/u/srikar_1996)\
**Post date:** [October 1, 2018, 12:56pm UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/7 "2018-10-01T12:56:02Z")

</div>

If you want to pass something specific you can use custom actions to do that. In that case, your template will not have the action. Every time that intent is triggered, the action\_show\_image will be triggered from your actions.py

- image intent
  - action\_show\_image

---

<div class="post-metadata">

**Author:** ![savitha\_1055](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@savitha\_1055](https://forum.rasa.com/u/savitha_1055)\
**Post date:** [October 4, 2018, 10:41am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/8 "2018-10-04T10:41:07Z")

</div>

As you said im following here you can see my actions.py file

 ![actions](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/1X/0a49c62172cd1cff7afa65917e085317589bdd12.png)I want to get that custom message as object from the bot and i will show that custom message as form in UI

Stories are like this

## searching about company

- greetings
  - utter\_greetings
  - action\_get\_formPayload

- Services\_we\_Provide
  - utter\_Our\_services
  - action\_Services\_weProvide

when im running the rasa core im getting error like this

 ![error](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/1X/f44fcf7e98823825057667f053d32a494e195d50.png)

I understood this error is bcz its not connecting to server ‘[https://localhost:5000/webhook](https://localhost:5000/webhook)’ but what is the need of endpoint and can u tell me where im doing wrong

---

<div class="post-metadata">

**Author:** ![savitha\_1055](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@savitha\_1055](https://forum.rasa.com/u/savitha_1055)\
**Post date:** [October 4, 2018, 11:23am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/9 "2018-10-04T11:23:20Z")

</div>

Im migrating from dialogflow to rasa and im following this link [https://medium.com/rasa-blog/how-to-migrate-your-existing-google-dialogflow-assistant-to-rasa-412cd07f424a](https://medium.com/rasa-blog/how-to-migrate-your-existing-google-dialogflow-assistant-to-rasa-412cd07f424a) when im running the rasa core using this command

python -m rasa\_core.run -d models/current/dialogue --endpoints endpoints.yml facing bellow error

 ![error1](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/1X/1be2ebd71c673d43abcf561e6961065bad90ea0b.png)

As im sending custom payload in dialogflow as object format , same way i want to get object from bot so i included custom payload in actions.py ![actions](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/1X/0a49c62172cd1cff7afa65917e085317589bdd12.png)

help me in fixing this issue

---

<div class="post-metadata">

**Author:** ![srikar\_1996](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@srikar\_1996](https://forum.rasa.com/u/srikar_1996)\
**Post date:** [October 4, 2018, 11:51am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/10 "2018-10-04T11:51:30Z")

</div>

Hello,

Actually, if you just want to send some text, just use utter\_message in your template file. I thought you wanted to send something else, that is why I suggested you to use custom actions.

Now, in the custom actions, there are

dispatcher.utter\_message()

dispatcher.utter\_template()

dispatcher.utter\_button\_template()

Your message will be in dispatcher.utter\_message() as it is a simple text. Your message must only contain a strings, you can’t pass in objects as such like in DialogFlow.

As far as I know, RASA has a fixed payload format while sending messages back. You need to see how you’ll pass those parameters and use it for your UI.

Endpoints are used to connect to other services. In the new version of RASA, you need to keep the endpoints server running.

`python -m rasa_core_sdk.endpoint --actions [Your actions file here]`

---

<div class="post-metadata">

**Author:** ![sam1](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sam1](https://forum.rasa.com/u/sam1)\
**Post date:** [January 17, 2019, 11:15am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/11 "2019-01-17T11:15:57Z")

</div>

Hi @srikar_1996 am facing the same issue as @savitha_1055 is facing when trying to trigger custom actions cant figure out where am going wrong could briefly say how we can trigger custom actions

i have used separate server always listening for any request to serve custom action am using python Flask

any help is appreciated thanks in advance

---

<div class="post-metadata">

**Author:** ![srikar\_1996](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@srikar\_1996](https://forum.rasa.com/u/srikar_1996)\
**Post date:** [January 17, 2019, 11:50am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/12 "2019-01-17T11:50:05Z")

</div>

Hi,

To enable custom actions: `python -m rasa_core_sdk.endpoint --actions actions.py` is the command to be used.

Before that, you need to mention it as an endpoint in the **endpoints.yml** file. Something like:

```auto
action_endpoint:
   url: http://localhost:5055/webhook

```

Hope this helps.

---

<div class="post-metadata">

**Author:** ![sam1](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sam1](https://forum.rasa.com/u/sam1)\
**Post date:** [January 18, 2019, 7:40am UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/13 "2019-01-18T07:40:03Z")

</div>

i have did the same but still i have problem in triggering custom actions

---

<div class="post-metadata">

**Author:** ![srikar\_1996](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@srikar\_1996](https://forum.rasa.com/u/srikar_1996)\
**Post date:** [January 23, 2019, 1:06pm UTC](https://forum.rasa.com/t/migrating-dialogflow-agent-to-rasa/1452/14 "2019-01-23T13:06:21Z")

</div>

Have you tried directly with out @app.route() in flask? Do you still face the same issue?
