Skip to main content
Question

Struggling posting in Spanish

  • April 1, 2026
  • 2 replies
  • 19 views

Angus Walker
Forum|alt.badge.img+3

I have a compound action:

steps:
  - for:
      output_key: user_bookings
      each: booking
      in: data.list_of_user_bookings
      index: user_index
      steps:
        - try_catch:
            try:
              steps:
                - action:
                    action_name: mw.get_user_by_email
                    output_key: got_user
                    input_args:
                      user_email: booking.email
                - switch:
                    cases:
                      - condition: data.lang == "es"
                        steps:
                          - notify:
                              output_key: officespace_output1
                              recipient_id: data.got_user.user.id
                              resources:
                                - name: instructions
                                  datatype: string
                                  value: '"Do not translate this message. Always display in Spanish"'
                              message:
                                RENDER():
                                  args:
                                    booking_date: booking.booking_date
                                    booking_desk: booking.desk
                                    booking_office: booking.office
                                  template: >
                                    Tiene una reserva para el escritorio <b>{{booking_desk}}</b> en

                                    <b>{{booking_office}}</b> mañana ({{booking_date}}).
                                    En caso de no asistir, por favor haga clic en el botón a continuación para cancelar
                                    su reserva.
                              actions:
                                - key: cancel1
                                  label: '"Cancela mi escritorio"'
                                  system_action:
                                    action_name: Cancel_desk_booking
                                    input_args:
                                      booking_date: booking.booking_date
                                      booking_id: booking.booking_id
                                      user_email: booking.email
                    default:
                      steps:
                        - notify:
                            output_key: officespace_output2
                            recipient_id: data.got_user.user.id
                            resources:
                              - name: instructions
                                datatype: string
                                value: '"Do not translate this message. Always display in Spanish"'
                            message:
                              RENDER():
                                args:
                                  booking_date: booking.booking_date
                                  booking_desk: booking.desk
                                  booking_office: booking.office
                                template: >
                                  You have booked desk <b>{{booking_desk}}</b> at <b>{{booking_office}}</b> for tomorrow
                                  ({{booking_date}}).
                                  There is a high demand for desks, so if you are not going to be in the office tomorrow
                                  please click the button below to cancel your desk
                            actions:
                              - key: cancel2
                                label: '"Cancel My Desk"'
                                system_action:
                                  action_name: Cancel_desk_booking
                                  input_args:
                                    booking_date: booking.booking_date
                                    booking_id: booking.booking_id
                                    user_email: booking.email
            catch:
              steps: []

As you can see, If data.lang = “es” then it should display the message in Spanish, other wise it should display the message in English.

I initially thought that the bot would automatically translate to the local language, but that didn’t happen, so I added this extra bit to display a translated message.

However, in the logs it shows it displaying in Spanish:
 

But to the user it shows it in English (yet the button sometimes appears in Spanish):
 

I’ve even added the instructions: "Do not translate this message. Always display in Spanish"
but it doesn’t seem to do anything.

FYI. The OfficeSpace mentioned is not the retail product, that you have connectors for. It is our internally developed system.

2 replies

Forum|alt.badge.img+1

Hello ​@Angus Walker ,

 

Greetings!…

The flow reads the user’s language from meta_info.user.language and renders the message in the user’s native language. This will resolve the translation issue.

system_instructions:
  RENDER:
    template: >
      Type your message here
    args:
      user_language: meta_info.user.language 

 

Thanks

BhanuPriya V


Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • April 1, 2026

@Angus Walker I see that the button is coming in Spanish because it is a hardcoded string and the notify message should also be a hardcoded string -- I will ask internally, in the meantime I recommend that you also file a support ticket so we can track this appropriately. 

Another question, do you know if the user receiving the notification has the assistant set up to speak in Spanish?

 

--

@bhanupriya.veluswamy meta_info.user.language is not a field that exists so your solution wouldn’t work :/