Thanks for the feedback.
Problem I have to get this text from a database:
I get a webhook with data:
{
“name”: “Ludmila Diniz Guerreiro”,
“cost”: “180.97”
}
fetch message data in MySQL
Olá [name], total de [cost],
I replace the [name] and [cust] data for json data
follow my project
{ "name": "suporte", "nodes": [ { "parameters": {}, "name": "Start", "type": "n8n-nodes-base.start", "typeVersion": 1, "position": [ 250, 300 ] }, { "parameters": { "httpMethod": "POST", "path": "suporte", "options": {} }, "name": "Webhook", "type": "n8n-nodes-base.webhook", "typeVersion": 1, "position": [ 170, 460 ], "webhookId": "2340d36b-e045-4e36-aae1-a04e776a9b55" }, { "parameters": { "values": { "string": [ { "name": "pegabanco", "value": "={{$json[\"texto\"]}}" } ] }, "options": {} }, "name": "Set Message", "type": "n8n-nodes-base.set", "typeVersion": 1, "position": [ 700, 420 ] }, { "parameters": { "functionCode": "const name = items[0].json.name;\nconst cost = items[0].json.cost;\nlet message = items[0].json.message_data;\nmessage = message.replace(/\\[name\\]/,name)\nmessage = message.replace(/\\[cost\\]/, cost);\nreturn [{json:{message}}];" }, "name": "Function", "type": "n8n-nodes-base.function", "typeVersion": 1, "position": [ 1000, 410 ] }, { "parameters": { "operation": "executeQuery", "query": "SELECT * FROM
mensagem LIMIT 50 " }, "name": "MySQL", "type": "n8n-nodes-base.mySql", "typeVersion": 1, "position": [ 450, 560 ], "credentials": { "mySql": "cloudways" } } ], "connections": { "Webhook": { "main": [ [ { "node": "MySQL", "type": "main", "index": 0 } ] ] }, "Set Message": { "main": [ [ { "node": "Function", "type": "main", "index": 0 } ] ] }, "MySQL": { "main": [ [ { "node": "Set Message", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": {}, "id": "7" }