Hi there, I'm encountering an issue with an HTTP request and can't seem to resolve it. When the initial part of the body is correct, the {{LOGO}}
placeholder appears as undefined
. I've double-checked everything, and I'm confident the problem lies in how the expression is written, but I lack the expertise to correct it. ChatGPT has been providing the same unhelpful advice. Occasionally, the body text changes to "invalid syntax". Any help would be greatly appreciated!
What does LOGO represent, and where is that value originating from?
Could you share an example of the input side of that node, illustrating where LOGO appears after the last node executed?
Hi there! Thanks for getting back to me.
{{LOGO}}
is a text placeholder within my Google Slides template. I manually inserted this text into a shape or text box, and my goal is to replace it with an image retrieved from Airtable.
The data from Airtable is processed via a “Search Records” node. This node includes a field named Logo
which is an array structured like this:
"Logo": [
{
"url": "https://example.com/image.png"
}
]
Subsequently, in the HTTP Request node, I attempt to send the following request to Google Slides:
{
"requests": [
{
"replaceAllShapesWithImage": {
"imageUrl": "{{$node["Search records"].json["fields"]["Logo"][0]["url"]}}",
"replaceMethod": "CENTER_INSIDE",
"containsText": {
"text": "{{LOGO}}",
"matchCase": true
}
}
}
]
}
However, when I execute this, it either indicates that "{{LOGO}}"
is undefined or results in a syntax error (specifically in the imageUrl
part). I'm aiming to ensure that Google Slides correctly replaces the placeholder with the image URL sourced from Airtable.
Ah, that's because {{ }}
is a special character combination for callin.io, so it's attempting to resolve it to something rather than sending it 'as is'.
You could try escaping those characters; it should work as they are the same characters used to escape JSON itself, but I'm not entirely certain this will function as expected.
{{LOGO}\}
You might consider using a different token for your Google Sheets replacement to sidestep this issue entirely.
Thanks, but it's still not functioning.
I'm not sure I grasp the different token solution. How would that completely resolve the issue?
Thanks for the assistance! It didn't quite work, but I managed to resolve it by adding another set node to isolate the specific information I needed, which simplified the expression considerably (not the perfect solution, but it was the only way I could get it functioning lol).