I keep perplexing to search jobs Once I have data and text chat gpt is better for reasoning, but also you can test to get the whole thing out of perplexity and save tasks so I recommend you test both options and see what you prefer There is no one way to do these things :)
I've a question. What if on the webhook node you want to reference specific data from earlier on in the zap workflow. e.g. model: "llama-3.1-sonar-large-128k-online", messages: [ { role: "system", content: "You're a smart data analyst providing summaries." }, { role: "user", content: "Provide a detailed report on the follow [Google Sheet Zap that has lists of Data fields] " } ] }; ive been trying to get the information that is sent to perplexity to be dependent on what's in my dataset but zapier keep throwing an error. It works perfectly fine without referencing prior zaps and fails whenever I reference.
Yes i faced that and what happens as such dynamic fields have brackets that disrupt the json format; there are many ways to address it, i have done it through a step by code by zapier where i run a Python “stringify” function that return any data in a basically format that is json friendly: 1- Create a code by zapier step 2- add any inputs you want to use in the code For below example i have for two inputs, named “text_input” and “text_input2” Code below: import json def stringify_input(input_text): # Use json.dumps to properly escape the input text return json.dumps(input_text) # Zapier provides input data through the `input` dictionary text_input = input.get('text_input', '') text_input2 = input.get('text_input2', '') # Stringify both inputs stringified_input1 = stringify_input(text_input) stringified_input2 = stringify_input(text_input2) # Return the results # Zapier expects a dictionary as output output = { 'stringified_input1': stringified_input1, 'stringified_input2': stringified_input2 } # This is how you return data in Zapier Python steps return output The output with be 2 strings that you can use in the api call
@@GiveMeTheMic22 Thanks for the reply. Really appreciate it. After days stressing, my issue was the zap had linebreaks and I needed to use the formatter to replace them with the newline thingies so the data could be decoded. For me, this was easier than stringifying it.
Thank you, this is amazing!
I so happy you found it helpful :)
Thanks for your video. I would like to ask, why didn’t you use perplexity instead of using chat gpt for the last step? Many thanks
I keep perplexing to search jobs
Once I have data and text chat gpt is better for reasoning, but also you can test to get the whole thing out of perplexity and save tasks so I recommend you test both options and see what you prefer
There is no one way to do these things :)
I've a question. What if on the webhook node you want to reference specific data from earlier on in the zap workflow.
e.g. model: "llama-3.1-sonar-large-128k-online",
messages: [
{
role: "system",
content: "You're a smart data analyst providing summaries."
},
{
role: "user",
content: "Provide a detailed report on the follow [Google Sheet Zap that has lists of Data fields] "
}
]
};
ive been trying to get the information that is sent to perplexity to be dependent on what's in my dataset but zapier keep throwing an error.
It works perfectly fine without referencing prior zaps and fails whenever I reference.
Yes i faced that and what happens as such dynamic fields have brackets that disrupt the json format; there are many ways to address it, i have done it through a step by code by zapier where i run a Python “stringify” function that return any data in a basically format that is json friendly:
1- Create a code by zapier step
2- add any inputs you want to use in the code
For below example i have for two inputs, named “text_input” and “text_input2”
Code below:
import json
def stringify_input(input_text):
# Use json.dumps to properly escape the input text
return json.dumps(input_text)
# Zapier provides input data through the `input` dictionary
text_input = input.get('text_input', '')
text_input2 = input.get('text_input2', '')
# Stringify both inputs
stringified_input1 = stringify_input(text_input)
stringified_input2 = stringify_input(text_input2)
# Return the results
# Zapier expects a dictionary as output
output = {
'stringified_input1': stringified_input1,
'stringified_input2': stringified_input2
}
# This is how you return data in Zapier Python steps
return output
The output with be 2 strings that you can use in the api call
@@GiveMeTheMic22 Thanks for the reply.
Really appreciate it.
After days stressing,
my issue was the zap had linebreaks and I needed to use the formatter to replace them with the newline
thingies so the data could be decoded.
For me, this was easier than stringifying it.