- Integrate with Asana API
- Extract data from Asana
- Iterate over the data and filter only the relevant
Configuration config.json was created using AutoFlow version 0.2.5
Is you have questions about this example, feel free to post your question on the community "Ask Questions" website.
- HTTP Server
- Endpoint (Method: GET)
- Action communication/http-request to make the HTTP API call to Asana
- Action json/decode to make the JSON easier to use
- Action data/set to create an empty array for storing the extracted database
- Action iteration/for-each to iterate over the Asana data which is in array
- Action array/insert-at to insert the extracted data into the array
- Action data/set to set the result in the response body
When build API solution, it is easier to mock the data, which makes it easier to build and test the solution.
The query comes from the user which consists of ID and Key. In our solution, you can simulate that. The returned data is stored in a new variable called "result"
Asana returns the data in JSON format. We can use the json/decode action to put the data in a more accessible format.
Extract the list from the data returned from Asana API
Array is commonly used to structure extracted data. Before we iterate over the Asana data, we use data set to delcare/create an empty array.
Notice that decoded Asana data was saved in a variable called "result_decoded". Each element's index and value are stored in index and value variables respectively.
As the Asana data is iterated, array/insert-at action inserts the selected data into the "sorted" array that was created earlier
To make the data available, data/set action is used to set data in the response body.
For Additional help on Asana API: https://asana.com/guide/help/api/api
Get Asana Key (you must be signed in) https://app.asana.com/0/developer-console