Skip to content

Instantly share code, notes, and snippets.

@bainternet
Forked from mannieschumpert/gist:8480059
Last active August 29, 2015 14:19
Show Gist options
  • Select an option

  • Save bainternet/73ca80fbece6f81b00d6 to your computer and use it in GitHub Desktop.

Select an option

Save bainternet/73ca80fbece6f81b00d6 to your computer and use it in GitHub Desktop.
<?php
$apikey = ""; // Your API key
$workspace = ''; // your project's workspace ID
$project = ''; // your project's ID
$tasks = array(
'Task 1',
'Task 2',
'Task 3'
// etc
);
// use this line if you want your tasks to be displayed in Asana in the order of the array
$tasks = array_reverse($tasks);
foreach ($tasks as $task){
exec( 'curl -u '.$apikey.': https://app.asana.com/api/1.0/tasks -d "name='.$task.'" -d "projects[0]='.$project.'" -d "workspace='.$workspace.'"', $return);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment