Python drama - SyntaxError

  • 15 November 2023
  • 1 reply

Userlevel 1

Hi Zapier team!

I have seen this posted before, though none of the fixes in comments seemed to solve the problems for me. I have some code (below) which works well in terminal:


curl --request POST \
--url "" \
--header "Authorization: <Hidden bearer token>" \
--header "Content-Type: application/json" \
--data-raw '{
"exportType": "VIEW",
"exportName": "External Fleet Summary Report",
"format": "CSV",
"language": "EN",
"objectType": "DEAL",
"type": "CRM_EXPORTS",
"portalId": 5848966,
"primaryExportObjectTypeId": "0-3",
"objectProperties": [
"associatedObjectType": "COMPANY"

unfortunately when i run the code through the Code by Zapier python stage I receive the following error code:

SyntaxError: invalid syntax (<string>, line 8)

Are you able to offer some guidance?

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @Hugpuf 

Good question.

Did you already review these help articles for using Python in a Code step?


You may instead want to use the Webhooks app: