You can use the Prebuilt Action Templates from your Bitly integration to auto-create dialog tasks and test them using the Talk to Bot option.
Steps to create a dialog task using Bitly action templates:
-
-
- Go to Build > Conversation Skills > Dialog Tasks.
- Click Create Dialog Task.
- On the Dialog Task pop-up, under the Integration, select the Bitly option to view the action templates.
Note: If you have not configured any integration for your virtual assistant, you will see the Explore Integrations option. Once you click this option, you will be redirected to the Actions page to configure an integration for your VA. For more information, see Actions Overview.
-
Bitly Actions
The following Bitly action is supported:
Supported Actions | Description | Method |
Short an URL | Shortens any long URL. | POST |
General Query
Steps to shorten the URL in the Bitly integration:
- Refer to the Installing the Bitly templates section to install this template.
- The Short URL dialog task is added with the following components:
- shortUrl: A user intent to shorten an URL.
- longURL – An entity node to enter a long URL.
- shortUrlService– A bot action service to send a query in an external integration. Click the Plus icon to expand to view the generalQueryService bot action component properties.
- In the Component Properties window, click the Edit Request link to edit the request parameters, as shown below.
Sample Request{ "long_url": "https://en.wikipedia.org/wiki/Constantine_V" }
- To add one or more responses, scroll down and click the +Add Response button.
Sample Response{ "created_at": "2023-08-25T08:38:00+0000", "id": "bit.ly/3E8Nec6", "link": "https://bit.ly/3E8Nec6", "custom_bitlinks": [], "long_url": "https://en.wikipedia.org/wiki/Constantine_V", "archived": false, "tags": [], "deeplinks": [], "references": { "group": "https://api-ssl.bitly.com/v4/groups/Bn448WZsE7j" } }
- generalQueryMessage – A message node with the script to display the query in the Bitly system.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to resolve a general query.
- Enter a long URL when prompted by the VA, as shown below.
- You will notice that the long URL is shortened. Click View Stats to view URL statistics in the Bitly instance.