Inject a string to HA service node?

Trying to learn node-red and home assistant.
I put a Inject node on grid and set it for text string with the words “Hello. I am a google mini.”.
I added a HA Service node and connected them.
The service node calls picotts_say with a domain of tts.

If I put the following in the service node data box:
{“entity_id”:“media_player.computer_room”}
then nothing happens. If I use:
{“entity_id”:“media_player.computer_room”,“message”:“Hello. I am a google mini.”}
then the google mini announces itself correctly.

TLDR: So, how do I pass a string from Inject to the HA service node? (I really thought that would be automatic somehow.)

You need to pass the data field into the node, as well. This confused me too when I was first getting started. Below is the code for a sample flow which fetches the state of a light, builds the string for a HA service call node, delays the message 5 seconds, then sets the light state back to what it was when the flow was initiated.

This was a flow I used to help a friend who wanted to have one of his lights change color temporarily when a notification came into Telegram.

You can import this into any flow, it’s short. If you’re going to use any part of it, make sure you modify the server information. If it were me, I wouldn’t deploy this, but you can look through it and see how it is done.

[
    {
        "id": "2d2a2c5d.038d44",
        "type": "template",
        "z": "77a95d32.723cc4",
        "name": "",
        "field": "payload",
        "fieldType": "msg",
        "format": "json",
        "syntax": "mustache",
        "template": "{\"data\": {\"entity_id\":\"{{data.entity_id}}\",\"brightness\":\"{{data.attributes.brightness}}\"}}",
        "output": "str",
        "x": 740,
        "y": 520,
        "wires": [
            [
                "4f51c2cc.f32b4c"
            ]
        ]
    },
    {
        "id": "64c2e48e.e6747c",
        "type": "inject",
        "z": "77a95d32.723cc4",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 220,
        "y": 520,
        "wires": [
            [
                "69dd54c.1e7beac"
            ]
        ]
    },
    {
        "id": "69dd54c.1e7beac",
        "type": "api-current-state",
        "z": "77a95d32.723cc4",
        "name": "",
        "server": "aad53eb0.732ad",
        "halt_if": "",
        "override_topic": true,
        "override_payload": true,
        "entity_id": "light.computer_desk_lights",
        "x": 480,
        "y": 520,
        "wires": [
            [
                "2d2a2c5d.038d44"
            ]
        ]
    },
    {
        "id": "bc9af540.9b59e8",
        "type": "api-call-service",
        "z": "77a95d32.723cc4",
        "name": "",
        "server": "aad53eb0.732ad",
        "service_domain": "light",
        "service": "turn_on",
        "data": "",
        "mergecontext": "",
        "x": 1110,
        "y": 520,
        "wires": [
            []
        ]
    },
    {
        "id": "4f51c2cc.f32b4c",
        "type": "delay",
        "z": "77a95d32.723cc4",
        "name": "",
        "pauseType": "delay",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 920,
        "y": 520,
        "wires": [
            [
                "bc9af540.9b59e8"
            ]
        ]
    },
    {
        "id": "aad53eb0.732ad",
        "type": "server",
        "z": "",
        "name": "Home Assistant",
        "url": "http://hassio/homeassistant",
        "pass": "redacted"
    }
]

That did the trick.
In the template (between inject and svc call) I used:
{“data”: {“entity_id”:“media_player.computer_room”,“message”:"{{payload}}"}}
That way it picks up the string from inject and passes it all to svc in the correct format.

Thanks!