Wanna build a superbot that can do ANYTHING? — here’s how

What if your bot could do ANYTHING? Wouldn’t your friends be impressed?

What if a user said, “can you dance” and your bot could dance?

Or write code?

Or even cry…

Wouldn’t that be sweeeeeeet?

Well, let me show you how you can train your bot to do, literally, anything under the sun.

What this tutorial will cover

This tutorial will show you how to use the sys.any entity in Dialogflow to extract keywords from an utterance and send it back to Chatfuel via Janis. In this example, we will also send the keyword to Giphy via Giphy’s API and return the response from Giphy to the user.

The instructions are for users of Chatfuel, Janis and Dialogflow, but can easily be modified for any Dialogflow agent.

What you need

Connect your Chatfuel bot to Janis (instructions can be found here). Put Janis’ JSON API url in your Default Answer block. This saves anything the user says to the attribute “user input” and sends it to Dialogflow.

2. In your Dialogflow agent, create a “Can You” intent and add utterances like “can you {{add random verb}}”. You may also want to add utterances like “will you…” or “do you….”.

Note: Some people will omit the word you, so you may want to add “can dance?” as a training phrase too.

3. Highlight each verb and set it to sys.any

4. Under Actions and Parameters, set the parameter name “any” to the sys.any entity. This stores the verb to parameter $any.

Note: The sys.any entity will also capture a string of words. For example, “can you play the guitar” will be stored as $any = play the guitar.

5. Add a Custom Payload for the response. Set an attribute called “query” that holds the random verb (stored as $any).