Make HTTP 400 Bad Request to SGTM/Meta CAPI – Invalid JSON/User Data Mapping
Hello Make Experts,
I’m facing a persistent Error 400 Bad Request when sending a Typeform Lead event via Make’s HTTP module to my Stape/sGTM tagging server.
I have completed the full SST setup, but the final request fails validation at the Meta API level.
Setup Details:
-
Flow: Typeform Webhook → Tools (Set Variables for Hashing/Time) → HTTP (POST to sGTM).
-
sGTM Endpoint:
https://sgtm.ivanmahalel.com/collect(Verified and Ready). -
Issue: The HTTP module receives Error 400. This implies the JSON is being validated by sGTM but is invalid according to Meta’s requirements.
Suspected Root Cause (Need Eyes on JSON Mapping):
My primary suspicion is that the HTTP module is incorrectly sending the hash/time values with the wrong syntax (e.g., sending template strings instead of pure values) or missing crucial identifiers needed for CAPI validation.
1. Hashing/Time Mapping Error: The event_time, em, and ph fields might be wrongly serialized in the JSON: * Goal: {"em": ["a3d9..."], "event_time": 1730...} (Pure string/integer values) * Current Issue: Potential extra quotes around the hash/time variables, or the formatDate output is not being processed correctly as an integer.
2. Missing Required Identifiers: The 400 might be due to Meta rejecting the Server-to-Server event because of missing client identifiers. I’m injecting dummy values for testing: * client_user_agent (Injected via Set Variable) * client_ip_address (Injected as 8.8.8.8)
Request to the Community:
Could someone with experience with Make.com → Server-Side GTM/CAPI please review the necessary syntax for injecting values from Set Variable (Tools) modules into the final HTTP JSON?
Specifically, should the variables be wrapped in quotes ("{{variable}}") or sent raw ({{variable}}), given they contain a hashed string and a Unix integer?
Any quick fix suggestions for the JSON formatting that commonly causes the 400 error would be highly appreciated.
Thank you!