Skip to content

Instantly share code, notes, and snippets.

@Garconis
Created August 21, 2023 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Garconis/7361ac17980b65de47bd38a3486a5db9 to your computer and use it in GitHub Desktop.
Save Garconis/7361ac17980b65de47bd38a3486a5db9 to your computer and use it in GitHub Desktop.
Asana API + Zapier | output all subtasks of a given task
// 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