Synthflow webhook payload differs between Initialize vs real calls, Gmail “Invalid To header” in Make

:bullseye: What is your goal?

Send an email via Gmail from a Make.com scenario triggered by a Synthflow webhook after a call ends, using the extracted prospect email address as the recipient and attaching a PDF downloaded from Google Drive.

:thinking: What is the problem & what have you tried?

Hi Make community,

I’m troubleshooting a Make.com scenario triggered by a Synthflow webhook and I need help pinpointing why Gmail rejects the recipient during real calls, even though it works during Synthflow “Initialize”.

Goal
Webhook (Synthflow) → Google Drive (download a PDF) → Gmail (send email with HTML body + attachment). The recipient email is spoken during the call and extracted by Synthflow.

What works
If I use Synthflow “Initialize” (test values), Make receives a flat payload and Gmail sends successfully when To is mapped to:
1.email_address

What fails
During a real Synthflow call, the scenario runs, downloads the file, but Gmail fails with a warning:
[400] Invalid To header
or
Validation failed: Invalid email address in parameter ‘to’

Key observation: payload shape is different between Initialize vs real calls
In real-call webhook output, I see:

collected_variables is null

The extracted email exists ONLY inside the executed_actions tree, for example:
executed_actions.extract_info_email_address.return_value.email_address = “marketing@duokem.com

Snippet (real-call payload section):
“executed_actions”: {
“extract_info_email_address”: {

“return_value”: {
“email_address”: “marketing@duokem.com
}
}
},
“collected_variables”: null

What I tried in Make

Mapping Gmail “To” to:
1.executed_actions.extract_info_email_address.return_value.email_address
Issue: In the scenario editor mapping panel, executed_actions sometimes doesn’t appear (likely because Make cached the schema from Initialize). If I type the path manually, Gmail rejects because it receives the literal text path instead of a mapped value.

Using ifempty and replace/trim sanitizing in the Gmail “To” field
Example attempts:

ifempty(1.email_address; 1.executed_actions.extract_info_email_address.return_value.email_address)

trim/lower/replace chains to remove newline/carriage_return/spaces
Result: Gmail still fails “Invalid To header”. In the run inspector, the “To” mapping sometimes still displays the expression text rather than resolving to the actual email.

Filters
I added a filter to only allow bundles through when an email exists, using:
length(trim(1.email_address)) > 0 OR length(trim(1.executed_actions.extract_info_email_address.return_value.email_address)) > 0
This fixed “missing To” in some runs, but Gmail still errors with Invalid To header in real calls.

New webhook
I created a new Make Custom Webhook and updated the Synthflow endpoint to the new URL. The scenario does receive runs, and the Webhooks module output for real calls clearly includes executed_actions. However, the editor mapping panel still often shows only the “flat” fields, and Gmail still fails if the To field doesn’t resolve cleanly.

What I need help with (technical questions)

How do I force Make to “refresh” / re-learn the webhook schema in the scenario editor so executed_actions reliably appears as mappable fields (without having to type the field path manually)?

Is there a best practice for referencing nested webhook fields when the payload schema changes between test/initialize vs real runs?

For Gmail “Invalid To header”: what is the most reliable way in Make to ensure the “To” field resolves to a plain string email (no hidden characters), especially when the source is a nested JSON field?

Should I use Tools → JSON Parse on Raw body and map from parsed output?

Or should I use Tools → Set variable to extract/sanitize the value first and then map Gmail To to that variable?

Where can I see the fully resolved “To” value that Gmail actually received (not just the mapping expression) so I can confirm if there are invisible newline/carriage return characters?

Current setup details

Trigger: Webhooks → Custom webhook

Middle: Google Drive → Download a File (attaching file in Gmail)

Action: Gmail → Send an email (HTML body)

Synthflow extracts the email via an action: extract_info_email_address

Real-call email value is confirmed as: marketing@duokem.com

If anyone has dealt with Make caching webhook schema from earlier test bundles, or has a recommended pattern for parsing nested JSON and feeding a “clean” email into Gmail, I’d appreciate concrete steps.

Thanks in advance.

:clipboard: Error messages or input/output bundles

Gmail module error:
[400] Invalid To header
(or) Validation failed for 1 parameter(s): Invalid email address in parameter ‘to’

Relevant webhook payload snippet from the same run (real call):

{
“collected_variables”: null,
“executed_actions”: {
“extract_info_email_address”: {
“return_value”: {
“email_address”: “marketing@duokem.com
}
}
}
}

Note: In Synthflow “Initialize” tests, Make receives a flat field email_address and Gmail sends successfully when To is mapped to 1.email_address. In real calls, email_address is nested under executed_actions…return_value.email_address, and mapping/cleaning issues cause Gmail to reject the To header.

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

Hey Carlos,

Can you show a screenshot of the webhook payload as well? From your description, it sounds like the email lives somewhere inside a nested array and Make doesn’t display everything inside and array. But typing the path manually should still work.

Hey Stoyan,

In real-call webhook payload the extracted email is not a top-level field. It’s nested here: executed_actions → extract_info_email_address → return_value → email_address, and collected_variables is null. Example from the webhook bundle: executed_actions.extract_info_email_address.return_value.email_address = marketing@duokem.com. In Synthflow Initialize tests, the payload is flat and I get a top-level email_address, so mapping Gmail To to 1.email_address works only for Initialize. In real runs, Make’s mapping panel doesn’t consistently show executed_actions, and if I type the path text manually in Gmail To it gets treated as literal text and Gmail returns 400 Invalid To header / invalid recipient. What’s the correct way in Make to reference that nested value when it’s not displayed in the mapper, should I use the get(object or array; path) function or JSON Parse the raw body first?” Could not share screenshot as I do not see a paperclip here to click on for attachments. Hope my answer helps

It should be something like:

{{1.executed_actions.extract_info_email_address.return_value.email_address}}

If you can share the payload directly we can help with an exact wording.

Type in the to field Just like shown below? because I had already tried that days ago and it comes back to the same invalid to error. If you notice when I click on the field to it does not give me an executed_actions option to select from the webhook menu. Here is a screenshot of the payload also.

That looks like the testing payload you were explaining about, where the email is in the top layer.

In that last screenshot → what do you see when you hover over the variable? Cause it seems it exists, it just may be something else. Also what is the payload like then?