Using the Bitly Action Template¶
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:
-
Ensure that you have configured Bitly and installed templates successfully. If you have configured it and skipped installing the templates, see Marketplace to install the templates.
-
Go to Automation AI > Virtual Assistant > Use Cases > Dialogs. All the dialogs are displayed.
-
Click the auto-created dialog. The the canvas opens with all required entity nodes, service nodes, and message scripts.
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
-
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.
-
You will notice that the long URL is shortened. Click View Stats to view URL statistics in the Bitly instance.