Help needed configuring MQTT switch

Hi,

I need a little advice please.

I have 2 MQTT switches I am trying to configure.

The command which needs to be sent needs to be sent in base64, however I need to declare a port on which to communicate in addition to the payload.

The format needs to be as follows:

The default topic for scheduling downlink payloads is:

application/APPLICATION_ID/device/DEV_EUI/command/down

The Application ID and DevEUI of the device will be taken from the topic.

Example payload:

{
    "devEui": "1234567890123456",
    "confirmed": false,
    "fPort": 85,
    "data": "CAAA/w=="
}

Can I use this in a template in the payload on and payload off?

Many thanks