VOGO Voice – Knowledge Base

Retrieve data from Airtable base

Estimated reading time: 6 min

Airtable is an entirely flexible tool that is endowed with the flexibility of a spreadsheet interface and the functionality of a database. This cloud based collaboration service provides its own API, making use of which one can leverage the VOGO Voice platform to read records and create meaningful interactions.

This comprehensive tutorial provides a step-by-step walkthrough on how to interact with an Airtable base to retrieve data and create a purposeful interaction. With this simple and straightforward, instructional tutorial you can gain hands-on experience on how to configure an Airtable instance within a custom interaction model for the purpose of relaying a returned result set of statistical data to the end-user and thereby maximize the user’s experience of the functionality of the custom skill. 

Prerequisites: 

  •  VOGO Voice account: https://www.vogovoice.com/
  • Access rights to the Intents section under Settings.
  • Access rights to the Interaction builder platform.
  • Airtable API key and Base ID
  • Knowledge in writing SQL queries.

Setting up an Airtable connector instance

In order to create an Airtable connector instance
1. Log into your VOGO Voice account to be directed to VOGO Voice Management Console (https://account.vogovoice.com)
2. Navigate to Settings on the top right-hand corner of the Dashboard and select Integration from the list of tabs displayed.
Settings > Integration
3. Click on the Add Button on the top left-hand corner of the screen.

4. In the Select Account Type window, choose the Airtable icon from the list of connectors and click the Create Connector button which opens up the Add Airtable Connection window.
5. Populate the required fields in the Add Airtable Connection window.

Field values

  • Assign a Name to the instance of the connector created. Here, the given name is ImportExport
  • Provide the API key and Base ID of the Airtable base to which access is required.

🖍 Note: The API Key and the Base ID are provided by the Airtable account holders.

To locate Base ID and generate an API Key, refer to our Airtable connector guide: https://university.vogovoice.com/kb/airtable/

6. After filling in the required fields click the Save button to set up and integrate the connector instance with the platform.

Create a custom intent

Create an appropriate intent to be invoked for executing an interaction flow mapped to it, the purpose here being to retrieve import/export statistical data for a specific year as queried by the end user. 

Create an intent titled ‘Import Export’ with a set of suitable sample utterance mapped to it. Let’s say the sample utterances are: “Tell me the export and import values for the year {year}”, Give me the export and import values for the year {year} andSay the export and import values for the year {year}” where ‘year’ is the slot name. Assign the slot type to ENVIRONMENT_Number which is a global slot with predefined values. 

To learn how to create custom intents refer the guide: https://university.vogovoice.com/kb/creating-intents/

Steps to Configure the Airtable connector instance 

Once the Airtable connector has been created, navigate to Interactions and click on the Interactions button at the bottom right-hand corner of the screen. Select the ‘Import Export’ intent to be directed onto the Interaction builder platform.

Now let’s create an interaction flow to return a resultset of the required statistical data regarding import and export depending on the user’s specific requirements.
1. In the flow diagram area, you will be able to see the Start and Response component.
2. Roll the mouse over the Response component to see the voice, computer and        camera icon on the top right-hand side of the component.
3. Click on the Voice icon of the Response card to open up the Speak pop-up window with a field titled Say, wherein you need totype the voice action intended to be spoken to the user.
   Say:Welcome to ABC Imports and Exports statistical data.

4. Check the checkmark box in the Expect Response and type in the suitable Prompt message to proceed with the flow.
5. Prompt: Say next for the export import values for the year {{inputs.year.value}}.
The same message will be replicated in the Reprompt field. 
Reprompt:Say next for the export import values for the year {inputs.year.value}}.

6. Populate the field under Expectations by selecting the Global Intent Next from the drop-down list.  

🖍 Note: Ensure to click the Save button to save the interaction flow as and when edits are made.

To learn about different template engines to be followed to run functions visit https://university.vogovoice.com/kb/template-engine/

To add a display message in a video-enabled voice-assisted device
1, Click on the Computer icon, and type in a condensed version of the voice message in the field titled Display Message of the Show pop-up window.
2. Populate the required fields and click the Save button. 
Title: ABC ImpExp
Display Message: Welcome to ABC Imports and Exports statistical data.

For further reference on how to populate the additional fields visit https://university.vogovoice.com/kb/guide-response-component/

7. Drag and drop an Airtable component onto the flow diagram area and connect the anchor symbol of Next on the Response component to the Airtable connector.

🖍 Note: To interconnect the different components click on their respective Anchor symbols so as to chain and hold them in the interaction flow.

8. Double click the Airtable component, or click the pencil to access the Configuration window and fill in the required fields to retrieve the desired data from the specific Airtable base.

Setting up the configuration fields for c1

Name: The name is provided by default and can be changed manually. It is used to identify the connector instance and how it is referenced throughout the flow. 

Table: Fill in the name of the table from which the relevant data has to be pulled in to cater to the user specific requirements of the skill.

 Note: Table names are case sensitive so please make sure the spelling and spaces are the same.

Filter: Specify the user input value to be filtered in the respective field representing year using the Airtable syntax format to generate a filtered content based on user specific queries from the data retrieved.

Max Records: Set the maximum number of data records to be retrieved and displayed through the device from the filtered content. If the Max records is set to 1, then Airtable will return only 1 data record even if the query matches multiple records.

To know more on how to populate the various fields refer to the Airtable connector guide: https://university.vogovoice.com/kb/airtable/

9. Drag and drop a Response component onto the flow canvas. You can alternatively right-click on the anchor icon and choose the response component.
10. Connect the anchor symbol of Next on the Airtable component to the Response card.

11. Click on the Voice icon of the Response card to open up the Speak pop-up window with a field titled Say, wherein you need totype the voice action intended to be spoken to address the user specific queries based on the data retrieved.

Say: The total export value for the year {{inputs.year.value}} is {{connectors.c1.first.total_export}} US dollars. The total import value for the year {{inputs.year.value}} is {{connectors.c1.first.total_import}} US dollars.

To add a display message in a display voice-assisted device
1. Click on the Computer icon, and type in a condensed version of the voice message in the field titled Display Message of the Show pop-up window.
2. Populate the required fields and click the Save button. 
 Title: ABC ImpExp
 Subtitle: {{inputs.year.value}}
 Display Message: Import: {{connectors.c1.first.total_import}}
                                  Export: {{connectors.c1.first.total_export}}

The screenshot below captures the aforementioned interaction flow.

Testing and Validation

  1. Click on the Test button next to the Flow Editor button on the interaction builder platform. 

2. In the Tests pop-up window that appears click the + button on its top right-hand corner.

3. Fill the Name field of the Test Response window that shows up.

4. In the Conversation section of the Test Response, Import Export intent through which this interaction flow has been initiated will be auto-generated in the User invokes field.
1. Fill the ‘With slots’ field titled ‘year’ under Conversation with the user’s input value representing the year based on which the data would be generated and relayed to the user. Here, the given year is 2011.

5. Click the plus button within the Conversation section to open up an additional field titled User Invokes. Ensure to populate this field by selecting the Next intent called to action within the interaction flow.

6. Finally, click the Save button to save the input and perform the test.
7. To validate the Test Response, click on the lightning symbol on the left-hand side of the test case. 

8. On the resultant Test Response window, the blue chat bubbles present the previously input message within the Response components. The single lightning bolt symbol in yellow represents the Airtable connector instance. 

9. Click on the chat bubble to see the details of the individual responses. To take a detailed look at the data fetching part of the connector instance, click on the lightning bolt icon highlighted in yellow. 

To know more about testing an interaction refer https://university.vogovoice.com/kb/testings/

Congratulations! You have successfully employed a statistical data use case and designed a purposeful interaction model to illustrate how to retrieve data from an Airtable base and thereby enhance the user’s experience of the functionality of the custom skill.

👍 Note: To test the functioning of the interactions on your device you have to deploy the custom skill to facilitate the skill with the new edits. To accomplish this, click on the Deploy button seen at the bottom of the Skill Settings pop-up window.

To know how to deploy a custom skill visit https://university.vogovoice.com/kb/deploying-a-skill/

  • To learn more about Airtable connector, click here.

Tags:
Was this article helpful?
Dislike 0
Previous: Iterations using Loop function
Next: Saved value vs Incoming value