Sitemap
Low Code for Data Science

A journal of articles written by (and for) the KNIME Community around visual programming, data science algorithms & techniques, integration with external tools, case studies, success stories, data processing, and (of course) KNIME Software.

DATA STORIES | REST API | KNIME ANALYTICS PLATFORM

Hey Siri, run my KNIME Workflow

8 min readDec 18, 2018

--

A KNIME Workflow being triggered by Siri and reading the response.
{
"Actors": [
{
"name": "Tom Cruise",
"age": 56,
"Born At": "Syracuse, NY",
"Birthdate": "July 3, 1962"
},
{
"name": "Robert Downey Jr.",
"age": 53,
"Born At": "New York City, NY",
"Birthdate": "April 4, 1965"
},
{
"name": "Margot Elise Robbie",
"age": 28,
"Born At": "Dalby, Australia",
"Birthdate": "July 2, 1990"
}
]
}

The KNIME Workflow

Simple KNIME Workflow to read REST data and write REST data.

Reading the JSON Input

First select the Age to select the field, then click Add collection query.

Deploying to KNIME Server

Interacting with the REST API

KNIME Server options on an uploaded KNIME Workflow.
http://192.168.0.232:8080/knime/rest/v4/repository/FGT/FGT-PoC/REST/Siri Experiment:execution?reset=true

Creating the Apple Siri Shortcut

Add a URL and Get Contents of URL action.
Grab the Request URL from Swagger.
Paste the URL into the URL action in Apple Shortcuts.
Add a new header for Authentication in Apple Shortcuts.
Basic XXXXXX
Grab your secret key from the Swagger curl command.
Run your shortcut and you should be getting a JSON response.
Select outputValues.
Take note of the name of the output node.
Select the node “json-output-65”.

Looping through each item

Remove the example One and Two and select Add new item in the List action.
Select Repeat Item from the list of variables.
Select Repeat Item and then Select as Text to change the value.
Select Dictionary.
Enter the value ages. This corresponds to ages in the JSON file.

Setting the Siri Shortcut and Output

Format the number and Show Result providing context for when Siri speaks.
Add a Siri Shortcut to trigger the Shortcut via voice.

--

--

Low Code for Data Science
Low Code for Data Science

Published in Low Code for Data Science

A journal of articles written by (and for) the KNIME Community around visual programming, data science algorithms & techniques, integration with external tools, case studies, success stories, data processing, and (of course) KNIME Software.

Craig Cullum
Craig Cullum

Written by Craig Cullum

Data & AI Specialist @ Microsoft. I’m probably doing a tutorial on the latest Azure cloud app. Any Q’s send me a tweet 🐥.

No responses yet