Combine 2 mqtt payloads

Hello

How would I combine these 2 please? I keep getting errors what ever I do

 alias: "Kitchen Animation Speed"
  initial_state: True
  hide_entity: False
  trigger:
    platform: state
    entity_id: input_number.kitchen_animation_speed
  action:
    service: mqtt.publish
    data_template:
       topic: "ren/kitchen/set"
       payload: '{"transition":{{ trigger.to_state.state | default(30) | int }}}'
    service: mqtt.publish
    data_template:
       topic: "ren/kitchen2/set"
       payload: '{"transition":{{ trigger.to_state.state | default(30) | int }}}'

Cheers
Mark