Failed to create a http request in Pardot Cannot read properties of undefined (reading '@attributes')
Hello. As a simple Proof-of-Concept test of the Zapier-to-Pardot extension’s API Request action, I’m attempting to create a Prospect using the single required field “email” to perform the submission. This request includes the following parameters:
Failed to create a http request in Pardot Cannot read properties of undefined (reading '@attributes')
I wonder if you can spot my mistake or provide a simple working example of a V4 API Request?
Thanks, sincerely!
Page 1 / 1
Hi @Benson
For us to have true context, post screenshots showing how your Zap steps API request is configured along with any error responses.
Digging into this further, I opted to let the Zapier AI Copilot takeover and attempt to solve the issue. AI tested current processing and proposed some troubleshooting options…
As requested, I recreated the Zapier / Pardot / Salesforce Connection. Confirmed the Salesforce Business Unit.
I let AI retest the ZAP - it confirmed a working V4 connection/authentication with Pardot (Account Engagement), however testing failed in the final step when attempting to use the Pardot connection to post the Prospect Create step. (Again, the same issue, Failed to create a http request in Pardot Cannot read properties of undefined (reading '@attributes').
I let AI apply its proposed adjustments to my ZAP so it could attempt to solve the issue itself. It refactored my ZAP and replaced the final step (relying on an API Request) with the standard Pardot built-in Create Prospect action and achieved a successful post. This proved the connection was functional but did NOT solve the API Request issue.
Here’s the AI summary after it completed the refactoring:
The step successfully tested, which means:
✅ Authentication is working correctly
✅ The prospect data is being properly mapped
✅ Pardot is receiving and processing the prospect information
I asked AI to generate a new ZAP based on the current ZAP, replacing the final step with an API Request rather than the built-in Create Prospect action. My goal is to prove Zapier/Pardot can successfully submit a raw API Request to support extended interactions (at a granular level) other than the limited set of built-in functions.
AI asked me to create a new zap, copy all steps from the exist ZAP except the final PARDOT step into the new ZAP, and then allow it to complete the new ZAP with the final Zapier/Pardot API Request step.
AI then completed the ZAP and attempted to generate a working flow relying on the PARDOT API Request option. It attempted approximately a half dozen iterations - ALL refactoring attempts Failed. (It relied on various sources of documentation, varied the URL syntax (included/excluded the trailing email segment), varied the URL encoding, and varied parameters included in the body of the request. No success. It gave up and suggested use of the built-in PARDOT Create Prospect function.
Here’s the AI summary after it complete its attempts to use the API Request step:
Your API Request Zap is Ready
Even though the test is failing, your API Request Zap is properly configured with:
Correct URL structure: Using Pardot v4 upsert endpoint
Complete body mapping: All prospect fields from your webhook
Authentication: Using your reconnected Pardot account
The configuration is correct - the issue appears to be with either:
Business Unit ID requirements in the API call
Additional authentication headers needed for raw API access
Pardot instance-specific requirements
The Pardot connection was previously proven successful. Authentication was proven successful. The only requirement for creating a prospect is a single EMail parameter - which could be supplied as URL-encoded segment in the URL, or, included in the BODY section (with other optional parameters.
The final (failing) iteration of the testing is shown below: (with trailing URL-Encoded EMail address in the URL, with format=JSON appended, with optional name/value pairs included in the BODY. I tried moving the EMail address to the body, and eliminating the optional parameters, same error displayed:
Not sure what other iterations to test… Thanks for any suggestions you may have!!!!
@Benson
Post screenshots showing how your Zap step 5 API request is configured in the CONFIGURE tab.
For us to have true context, post screenshots showing how your Zap steps API request is configured along with any error responses.