Can anyone help me retrieving deepseek message into slack block kit

I am not able send the result of deepseek to slack’s block kit. It’s giving an IMLError
Function ‘getBlocksData’ finished with error! JSON for blocks is invalid.

this is the slack’s block kit i provided:
{
“blocks”: [
{
“type”: “rich_text”,
“elements”: [
{
“type”: “rich_text_section”,
“elements”: [
{
“type”: “text”,
“text”: “{{33.message.text}}”,
“style”: {
“bold”: true
}
}
]
}
]
},
{
“type”: “divider”
},
{
“type”: “rich_text”,
“elements”: [
{
“type”: “rich_text_section”,
“elements”: [
{
“type”: “text”,
“text”: “Answer: {{40.result}}”,
“style”: {
“bold”: true
}
}
]
}
]
},
{
“type”: “actions”,
“block_id”: “approval_buttons”,
“elements”: [
{
“type”: “button”,
“text”: {
“type”: “plain_text”,
“emoji”: true,
“text”: “Approve”
},
“style”: “primary”,
“value”: “{{47.key}}”,
“action_id”: “approve_button”
},
{
“type”: “button”,
“text”: {
“type”: “plain_text”,
“emoji”: true,
“text”: “Edited”
},
“style”: “danger”,
“value”: “{{47.key}}”,
“action_id”: “edited_button”
}
]
}
]
}

the error is with ((40.result))

Hey there,

and what is the JSON you are trying to send? Maybe it has some special symbols in it causing some issue?

On a side note, you can use the make dev tools extension to see what exactly is being sent. I’ve found it very helpful especially with JSON related errors, in some cases it will highlight where the string is breaking.

this is the result i received from deepseek:
“result”: “The production of sulfur trioxide (SO₃) from sulfur dioxide (SO₂) and oxygen (O₂) is an exothermic reaction described by the equation:\n\n\[ 2SO₂(g) + O₂(g) \rightleftharpoons 2SO₃(g) \]\n\nAccording to Le Chatelier’s principle, for exothermic reactions, lower temperatures favor the formation of products. However, the reaction rate decreases at lower temperatures. Therefore, a compromise is needed to balance reaction yield and rate.\n\nThe most suitable temperature for this reaction is 400–450°C. This range provides a good balance:\n1. It ensures a reasonable reaction rate.\n2. It allows for a significant yield of SO₃.\n3. It avoids excessively high temperatures, which would shift the equilibrium back toward reactants due to the exothermic nature of the reaction.\n\nA catalyst (vanadium pentoxide, V₂O₅) is also used to increase the reaction rate at this temperature.”,

it’s working if i pass the same text manually through running the slack module alone, but it causes an error when i run it throughout with the same text passed.

i tried to replace
“text”: “{{replace(79.result; “\n””; “\n”)}}"

still not working.