Inconsistant errors in Workflows for the same action

I have an action that interfaces with the Asana API to create a task. My implementation of the ApiClient instance is as follows, as per the Asana API documentation

const Asana = require('asana');
const defaultClient = Asana.ApiClient.instance;

However, I’m getting this error

TypeErrorCannot read properties of undefined (reading ‘instance’)

I’ve spoken to the guys in Asana on their developer forum and they have confirmed this implementation.

I’m using the same action in other workflows and it works fine. Seems as though the action can’t get the required package for this workflow. Asana did recently change their API and I suspect that Pipedream is getting the incorrect version of the asana package for this workflow only. Could it be some caching issue?

Hi @SHG-IT,

Would you mind sharing the node version in your Node.js code that you used?

Maybe you can use the Asana API instead of the SDK?

curl --request POST \
     --url https://app.asana.com/api/1.0/tasks \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Or you can use Pipedream action

Hey @vunguyenhung I implemented the native Pipedream Asana actions and now my workflow works. Thanks