Skip to main content

Trigger: A new Google Form submission lands in our Opportunity Intake Google Sheet.
Step 2: A ChatGPT action reads that row, then generates the project summary, checklist, deliverables, travel notes, etc.—all the merge-field text our Google-Docs templates need.
Steps 3-5 (what the Zap should do):

  1. Create the correct Google Docs – Project Brief always, plus Creative Brief and/or Travel Brief when flagged.

  2. Save each doc in the project’s Drive folder (one copy each).

  3. E-mail the team the right brief(s) and SMS me an alert.

What’s going wrong:

  • Google-Docs step throws Cannot read properties of undefined (includes) even though it still creates files.

  • An extra “All Paths” branch fires, so we get duplicate docs, the wrong file attached to the e-mail, and the SMS sometimes doesn’t send.

Suspected root causes & desired fixes:

  1. Some ChatGPT fields arrive as undefined → default every merge field to an empty string so the error disappears.

  2. Delete the duplicate “All Paths” branch (or gate doc-creation with Filters) and move e-mail/SMS so they run once per Zap.

All templates, screenshots, Zap-history CSV, and detailed notes are attached below. I’m looking for guidance—or hands-on help—implementing those fixes so the automation runs clean every time.

Hi ​@Todd1HHD,

Can you share a screenshot of step 38 in editor mode, so I can get a better sense of what’s going on in there.

Also, what’s the purpose of the All Paths branch. From the sounds of it, that will definitely create duplicate Docs every time. 


Hi ​@Todd1HHD,

Can you share a screenshot of step 38 in editor mode, so I can get a better sense of what’s going on in there.

Also, what’s the purpose of the All Paths branch. From the sounds of it, that will definitely create duplicate Docs every time. 


For sure ​@DennisWF! Attaching the input, and the output that it shows and the errors specifically.

In regards to the “All Paths” branch, basically based on the project type there will either be a Project Brief, a Creative Brief, or a Travel Brief. Some time a combination of two documents or all 3 which is the “All Paths” branch.
 


Thanks, ​@Todd1HHD. I’m still not seeing what might be causing the error in Step 38. Could you add another screenshot of the Data In tab from a failed run of that step, but scrolled all the way down so I can see all the inputs being fed into that step? I dont see anything undefined in the fields I can see so far in your current screenshot, but wondering if there’s anything further down. 
 

Is it ever possible for the structured data fields that you’re generating with the AI steps to be undefined, or have you set all those outputs to be required in the AI step settings?


In terms of the duplicate docs being created, are the filter conditions that define each of your path branches mutually exclusive? If not, then when a given project meets the conditions for multiple branches, all of those branches will run (in other words, it doesn’t only run the first branch whose conditions are met - it runs all of them).


In terms of the duplicate docs being created, are the filter conditions that define each of your path branches mutually exclusive? If not, then when a given project meets the conditions for multiple branches, all of those branches will run (in other words, it doesn’t only run the first branch whose conditions are met - it runs all of them).

@DennisWF That was my thought as well, but from the Zap history, it looks like only one path(with all 3 documents) was selected successfully:


After I started getting the error, I did think I could clean it up and make it simpler with only 3 paths, and then make it so if all three documents are needed, then all three paths will run, etc. Initially, I wasn’t sure if more than one path can run in a zap.


Thanks, ​@Todd1HHD. I’m still not seeing what might be causing the error in Step 38. Could you add another screenshot of the Data In tab from a failed run of that step, but scrolled all the way down so I can see all the inputs being fed into that step? I dont see anything undefined in the fields I can see so far in your current screenshot, but wondering if there’s anything further down. 
 

Is it ever possible for the structured data fields that you’re generating with the AI steps to be undefined, or have you set all those outputs to be required in the AI step settings?

@DennisWF Sure! The Data In is attached. I can also send the Document template. 


In terms of the duplicate docs being created, are the filter conditions that define each of your path branches mutually exclusive? If not, then when a given project meets the conditions for multiple branches, all of those branches will run (in other words, it doesn’t only run the first branch whose conditions are met - it runs all of them).

@DennisWF That was my thought as well, but from the Zap history, it looks like only one path(with all 3 documents) was selected successfully:


After I started getting the error, I did think I could clean it up and make it simpler with only 3 paths, and then make it so if all three documents are needed, then all three paths will run, etc. Initially, I wasn’t sure if more than one path can run in a zap.

@Todd1HHD in the run history, each branch of a Path that runs is treated as a separate run,  so it’s not immediately obvious if the same trigger event has resulted in multiple branches running. To identify whether that’s happened, you have to look for separate runs in the history occurring at almost the same time stamp, and initiated by the same trigger event. 


In terms of the duplicate docs being created, are the filter conditions that define each of your path branches mutually exclusive? If not, then when a given project meets the conditions for multiple branches, all of those branches will run (in other words, it doesn’t only run the first branch whose conditions are met - it runs all of them).

@DennisWF That was my thought as well, but from the Zap history, it looks like only one path(with all 3 documents) was selected successfully:


After I started getting the error, I did think I could clean it up and make it simpler with only 3 paths, and then make it so if all three documents are needed, then all three paths will run, etc. Initially, I wasn’t sure if more than one path can run in a zap.

@Todd1HHD in the run history, each branch of a Path that runs is treated as a separate run,  so it’s not immediately obvious if the same trigger event has resulted in multiple branches running. To identify whether that’s happened, you have to look for separate runs in the history occurring at almost the same time stamp, and initiated by the same trigger event. 

@DennisWF I downloaded the error log CSV, if that helps