Adds a project code prefix to new tasks added in Asana using a service deployed to Vercel.
e.g. [PRJ-#] Task Name
Install package dependencies
yarn
now --prod
Rename the .env.example
file to .env
and update with the required values.
ASANA_ACCESS_TOKEN=<Asana Personal Access Token>
ASANA_PROJECT_ID=<Asana Project ID>
ASANA_PROJECT_PREFIX=<Project Task Prefix>
Add the same environment variable values to the Vercel project.
now env add ASANA_ACCESS_TOKEN production
# Add ASANA_ACCESS_TOKEN value
now env add ASANA_PROJECT_ID production
# Add ASANA_PROJECT_ID value
now env add ASANA_PROJECT_PREFIX production
# Add ASANA_PROJECT_PREFIX value
Execute the Asana webhook registration script on the deployed production URL.
yarn run register --url https://<PROJECT_URL>.now.sh/api/asana
ASANA_WORKSPACE_ID
Enables the retrieval and deletion of existing webhooks registered with the workspace. [Optional]
WATCH_CHANGES
Enables prefixes to be added to tasks that already exist when an update occurs to any field within the task. (true
/false
) [Default = false
] [Optional]
Start the development server using the Vercel CLI.
now dev
Forward the local port to the outside using ngrok
.
ngrok http 3000
Register the ngrok
tunnel with the Asana webhook functionality.
yarn run register --url https://<NGROK_URL>.ngrok.io/api/asana
Note: Requires the ASANA_WORKSPACE_ID
environment variable.
yarn run get
yarn run delete --webhookId 1178960809589035
When registering a webhook I am receiving a Error: Forbidden
message.
If you have already registered the webhook once before, try deleting it and re-registering with the yarn run register
command.