Teckst

How to set up a Teckst integration to build an SMS bot

Teckst integration lets you easily connect your customer with a bot. Together with a NLU tool, such as, Dialogflow, it's easy to create automation for complex problems.

1280

Meya’s Teckst integration allows you to:

  • Send and receive media and text messages between your customer and a bot
  • Create a bot to send SMS messages

Components

meya.teckst.component.message.send

  • Send a message to a valid phone number

meya.teckst.component.media.send

  • Send a media to a valid phone number

Setup

📘

Since we need Meya's webhook to request Teckst credentials we need to first add the integration with placeholder values

Adding secrets to the vault

To begin with we need to first create Teckst vault variables

Console

Access your vault and add manually each one of the values bellow.

Pycharm

Edit your vault.secrets and add the values bellow.

teckst.teckst_client_id: xxx
teckst.teckst_api_key: xxx
teckst.teckst_phone_number: xxx
teckst.teckst_api_url: xxx
teckst.meya_api_key: xxx

Update vault's variables

meya vault upload --file your-vault-secrets

Create the integration

Console

Go to your console's app integration and add Teckst integration to your app.

Pycharm

Create a file under the integration folder called teckst.yaml

The file should look like the snippet bellow.

type: meya.teckst.integration
teckst_client_id: (@ vault.teckst.teckst_client_id)
teckst_api_key: (@ vault.teckst.teckst_api_key )
teckst_phone_number: (@ vault.teckst.teckst_phone_number )
teckst_api_url: (@ vault.teckst.teckst_api_url )
meya_api_key: (@ vault.teckst.meya_api_key )

Update your app

meya push --build-image

Retrieve Teckst webhook

meya webhooks | grep teckst

Save it for later

Generating Meya's API token

Generate a 32 characters long alphanumeric token, e.g., 305fce4992844f1a1126bc25481fa597
Save it for later

Requesting credentials

Once you have the alphanumeric token and Meya's Teckst webhook you'll need to request to Teckst your customer credentials. Send the webhook and token to [email protected] requesting the credentials

Updating vault

Now that we have all the credentials we can update our vault with the correct values.
After adding the correct values to vault you'll need to upload vault's values and build push your app.

🚧

Since Teckst's phone number is on E.164 format you'll need to wrap it in quotes on your vault to ensure the app interprets it as a string, instead of an integer.

meya vault upload --file your-vault-secrets
meya push --build-image

Using Teckst

Create a flow

triggers:
  - keyword: hi

steps:
  - say: Hello, World!

Save the flow, then run these commands in your terminal to upload your changes:

meya format
meya push

Try it out

In your phone’s messaging app, send the word hi as a text message to your Teckst phone number. The app should reply with Hello, World!

1280

Teckst Components

Create a flow for sending messages and another to send media messages
Change the example values with real ones

triggers:
  - keyword: teckst_send_message
 
steps:  
  - type: meya.teckst.component.message.send
    message: Hello
    phone_number: +11111111111
    integration: integration.teckst
  
  - say: Message sent successfully.
triggers:
  - keyword: teckst_send_media_message
 
steps:  
  - type: meya.teckst.component.media.send
		message: Hello
    media_url: https://media-url.com.br
    phone_number: +11111111111
    integration: integration.teckst
    
  - say: Media message sent successfully.
meya format
meya push

Try it out

Use your app simulator to trigger both flows

542 499

You should see both messages and media to the phone number you previously specified in both flows