Skip to content

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:

  1. 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.

  2. Go to Automation AI > Virtual Assistant > Use Cases > Dialogs. All the dialogs are displayed.

  3. 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:

  1. Refer to the Installing the Bitly templates section to install this template.
  2. The Short URL dialog task is added with the following components:
    Dialog task added

    1. shortUrl: A user intent to shorten an URL.
    2. longURL – An entity node to enter a long URL.
    3. 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.
    4. In the Component Properties window, click the Edit Request link to edit the request parameters, as shown below.
      Request

      Sample Request

      {
          "long_url": "https://en.wikipedia.org/wiki/Constantine_V"
      }
      

    5. To add one or more responses, scroll down and click the +Add Response button.
      Add Response

      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"
      }
      }
      

    6. generalQueryMessage – A message node with the script to display the query in the Bitly system.

  3. Click the Train tab to complete the Dialog task training.

  4. Click the Talk to Bot icon to test and debug the dialog task.
  5. Follow the prompts in the VA console to resolve a general query.
  6. Enter a long URL when prompted by the VA, as shown below.
    Enter long url

  7. You will notice that the long URL is shortened. Click View Stats to view URL statistics in the Bitly instance.
    View Stats