Created
August 21, 2023 21:58
-
-
Save Garconis/7361ac17980b65de47bd38a3486a5db9 to your computer and use it in GitHub Desktop.
Asana API + Zapier | output all subtasks of a given task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is wrapped in an `async` function | |
// you can use await throughout the function | |
var parentTaskID = inputData.parentTaskID ; // get the variable from the parentTaskID | |
// get the subtasks based on the parentTaskID | |
const res = await fetch('https://app.asana.com/api/1.0/tasks/' + parentTaskID + '/subtasks', { | |
method: 'GET', | |
headers: { | |
'Authorization': 'Bearer 1/2345' | |
} | |
}); | |
const data = await res.json(); | |
output = {data: data}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment