Skip to main content

For the best part of 15 hours i have consulted AIs and youtube etc to try and figure out what could possibly be wrong with my Zap, so here i am with one final hope before i just quit and accept this cant be done.

What im doing:

I have a google sheet that gets regularly updated:

I am trying to take the row data (more rows could be added or some taken away) for promotional offers and basically format it into a message i can tell my manychat bot to send to users who trigger it. This data must be updated automatically, meaning if the google sheet is changed, the output message must be changed accordingly.

In ManyChat:

I have a trigger word, followed by an external request containing the URL of one of my Zaps catch hooks.

In Zapier:

I have one Zap:

The trigger is a catch hook configured just using a chosen record (from what i understand this is just the spreadsheet row zapier uses to test)

I then get many spreadsheet rows from the google sheets action. this is simply configured so that it picks the sheet im using and encapsulates each row (columns are set A:Z and rows go up to 10, more than i need) so thats fine.

Next i loop this data as told by zapiers helper AI in order to get them as text strings? Not too sure but i do it anyway  choosing get loop from line items:

This is what im looping over.

Next, i use code by zapier to format the text strings i get into the messages i will send to manychat. These are my value sets:

And this is my code, as written by the AI helper:

This then produces an output value called “Deals Message”, the only problem is that this value is empty:

 Which is where the final ManyChat step fails, since when i use this value for the content input, it says content cannot be empty:

therefore:

All tests, from start to finish work, the code works, everything, but it simply doesnt output anything…

I have tried using AI for hours and tried all the “solutions” it gives me, half of which dont even appear to exist in Zapier such as Text action, Transform: Join text which isnt a thing. I have tried using 2 Zaps, but dont understand why this one above wouldn’t work. Im at a loss, if anyone could tell me what im missing it would be appreciated.

Hi ​@NewZapper1999,

 

Welcome to the Community.

 

The issue likely stems from the 'Code by Zapier' step not processing data correctly. Double-check the code formatting and ensure the data is properly passed from the 'Looping' step. Test each step individually to confirm outputs. Also, verify that the ManyChat step correctly maps the formatted text. If the problem persists, reviewing the exact code and outputs may help identify the issue.

 

I hope this helps. If you have any further questions or need more assistance, feel free to ask.


Hi, thank you for the suggestions! So to follow up, I have tried your suggestions and each step is working until the coding step. I have tested the output for each stage and I am returning what I expect to be returned, so the issue must lie while coding the message. 
 

More specifically, since I am quite new, I understand when mapping data in Zapier from a previous step, they are called pills? If so have i chosen the correct data to map from my looping step to my code step shown in the images above? As in, is it ok to use one value set for each data point (Name, description, etc) and are the preview values the correct “pills” to use? 
 

I guess if you could link me to a guide on mapping data it would help as I’m not too sure how it works, what I’m doing seems intuitive taking previous outputs and using them as inputs, but I have no validation that it’s actually correct,

 

Thank you!


Hi ​@NewZapper1999,

 

In Zapier, "pills" are dynamic data pieces that can be pulled from one app and used in another. When setting up Zaps, these pills appear in dropdown menus to map data between steps. You are correctly mapping output from a looping step to a code step, but it's unclear if the correct pills are selected without seeing your setup. To ensure smooth data mapping, check that the format matches what the receiving step expects. If issues persist, refer to guides on Working with Fields and Using data form one step in another or provide more details on your setup and errors.


Hi ​@NewZapper1999, just checking in! Did Jammer help to get you pointed in the right direction?

Let us know if you still need any assistance—happy to lend a hand if you’re still stuck at all! 🙂