Skip to main content
Cisco Webex

Learn to set up Webex bots and integrations to interact with messages and users safely, plus configure Webex steps in Torq workflows.

Updated over 6 months ago

The Webex integration enables you to interact with messages, users, and rooms on behalf of a user account (integration) or a bot.

Be aware that by design, published Webex bots can be interacted with by anyone, regardless of organization. You should implement a check on your bot before taking any actions in response to its triggers.

Create a Bot in Webex

Bots are similar to regular Webex users. They can participate in 1-to-1 and group spaces and users can message them directly or add them to a group space. A special badge is added to a bot's avatar in the Webex clients so users know they're interacting with a bot instead of a human.

A bot can only access messages sent to it directly. In group spaces, bots must be @mentioned to access the message. In 1-to-1 spaces, a bot has access to all messages from the user.

Bots do not, however, perform actions within Webex on behalf of a Webex user. For more information about bots, see the Webex documentation.

  1. Log in to developer.webex.com and click Start Building Apps.

    image.png
  2. Click Create a Bot.

    image.png
  3. Fill in the bot information:

    1. Bot name: the bot's name as it will appear in Webex.

    2. Bot username: Webex users will use this to add your bot to a space and the username passed in the mentionedUsers parameter for message steps. It cannot be changed later.

    3. Icon: the icon of the bot that will appear in Webex.

    4. Description: information about what the bot will do.

      image.png
  4. Click Add bot.

  5. Copy the Bot access token. You will need this when you configure the Webex integration in Torq.

Create an Integration in Webex

Integrations are how you request permission to invoke the Webex REST API on behalf of another Webex user.

  1. Log in to developer.webex.com and click Start Building Apps.

    image.png
  2. Click Create an Integration.

    image.png
  3. Fill in the integration information.

    1. Integration name: the name of the integration as it will appear in Webex.

    2. Icon: the icon of integration that will appear in Webex.

    3. Description: information about what the integration will do.

    4. Redirect URI: the URL where you'll be directed to complete the OAuth setup. You can enter https://app.torq.io. or EU: https://app.eu.torq.io

    5. Select all of the scopes to apply to the integration. The scopes determine which APIs can be performed with the integration. The Webex steps in Torq interact with messages, users, rooms, and actions.

  4. At the bottom of the page, click Add Integration.

  5. Copy and save the Client ID and Client Secret.

  6. Copy the OAuth Authorization URL.

  7. Generate an access token. You need the access token to create the Webex integration in Torq.

    1. Open a new web browser and paste the OAuth authorization URL generated when you created the integration.

    2. Scroll to the end of the URL and replace state=set_state_here it with state+hello.

    3. You might be directed to log in to Torq. Copy the code value after you're in Torq from the URL bar.

      image.png
  8. To get the access token, you need to make a POST call to the following Webex endpoint https://webexapis.com/v1/access_token and, in the body, pass all required parameters. For detailed information, see the Webex documentation.

    image.png
  9. The response will include the access token. Copy the access token, you'll need this when you create the Webex integration in Torq.

    image.png

Create a Webex Integration in Torq

The Webex integration enables you to use Webex steps in workflows. The steps allow you to interact with actions, messages, rooms, and users. In addition, the Create a webhook trigger step defines which Webex events to send to Torq to trigger workflows. Depending on what you intend to use the integration for, you should use the bot or integration access token generated earlier.

  1. Go to Integrations > Steps > Webex

  2. Click Add.

    1. Enter a meaningful name for the integration.

    2. Paste the access token created earlier or the Bot access token.

    3. Put in your Organization ID.

      1. Locate the Organization ID in Webex by going to the Partner view > Customers > View my Organization > My Company.

      2. In Info, the organization ID is found under Company Information.

      3. For more information on the organization ID see the Webex docs.

  3. Generate a secret to secure your messages.

  4. Click Add.

Check your Bot for Legitimacy

Compare the returned orgID to your orgID or list of IDs by implementing the Get user details step and using an If operator that exits the workflow if necessary.

image.png

Use the Create a Webhook Step

  1. Open a workflow in Torq.

  2. Search for the Create a webhook trigger step and drag it to the designer.

  3. Configure the step.

    1. EVENT: the action taken on the resource to generate an event. Options include:

    2. RESOURCE: the Webex resource to generate an event for. Options include:

    3. TARGET_URL: Each Webex event trigger subscribes to a single event and resource. To send all Webex events to a single Torq webhook, use the same endpoint URL for TARGET_URL.

    4. WEBHOOK_NAME: a unique name for the Webex webhook trigger

    5. INTEGRATION: the Webex integration in Torq.

image.png

Ask a Question with your Torq Bot

  1. Find the User or Room ID to which you want to ask a question.

    1. Use the List Users or List Rooms steps to find the appropriate user.

  2. Write a clear and concise question in the question field.

  3. Select the appropriate Webex integration.

  4. You can optionally add Default response text or Timeout by going to the manage parameters icon.

  5. The message response will be sent back to Torq immediately upon a response being selected.

    image.png

Templates

Did this answer your question?