What is Causing the Error Code 400 When Inserting Data into the ASANA UPDATE TASK?

This topic was automatically generated from Slack. You can find the original thread here.

When inserting data into the ASANA UPDATE TASK I am getting the following error:

Error - Request failed with status code 400
{“errors”:[{“message”:“task: Not a Long: undefined”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: Errors”}]}

Is there a code that you can give me so I can see what is being sent?

I’m sorry to hear that you’re encountering an error. To help you debug the issue, you can use the Asana Update Task action in your Pipedream workflow and log the data being sent. Here’s how you can do that: 1. Search for the Asana app from the step menu. 2. Select the Update Task action. 3. Connect your Asana account. 4. Configure the required fields (Task GID, Name) and any optional fields you need. 5. Add a code step after the Update Task action. 6. In the code step, add the following code to log the data being sent: console.log("Task GID:", steps.update_task.$parameter.task_gid); console.log("Name:", steps.update_task.$parameter.name); // Add any other optional fields you've configured, like this: // console.log("Workspace:", steps.update_task.$parameter.workspace); Replace update_task with the actual step name of your Update Task action. This will log the data being sent to the Asana Update Task action in the Pipedream execution logs when you run the workflow. You can then review the logs to see the data being sent and identify any issues. If you still need help, please visit https://pipedream.com/support for more support options.

ERROR:

ReferenceError
steps is not defined

I apologize for the confusion earlier. It seems I provided you with the wrong code snippet. Since you’re encountering a “task: Not a Long: undefined” error, it’s likely that the Task GID is not being passed correctly to the Asana Update Task action in your workflow. To help you debug the issue, please follow these steps: 1. Add a Code step right before the Asana Update Task action in your workflow. 2. In the Code step, add the following code to log the Task GID and other data being sent to the Asana Update Task action: console.log("Task GID:", steps.YOUR_UPDATE_TASK_STEP_NAME.$parameter.task_gid); console.log("Name:", steps.YOUR_UPDATE_TASK_STEP_NAME.$parameter.name); // Add any other optional fields you've configured, like this: // console.log("Workspace:", steps.YOUR_UPDATE_TASK_STEP_NAME.$parameter.workspace); Replace YOUR_UPDATE_TASK_STEP_NAME with the actual step name of your Asana Update Task action. 3. Run the workflow and review the logs to see the data being sent and identify any issues. If you still need help, please visit https://pipedream.com/support for more support options.