The CreatorCon Call for Content is officially open! Get started here.

Preview Notification and notification is Blank

Rufino
Giga Guru

Hello Folks!

 

We have a workflow that trigger a event and send a notification to a user registred on a table.

When I try to "preview notification" the notification body doesn't appear, it's blank. When I create a new register, the event is created and the notification is sent, but when I see the logs, the notification still empty.

I use exactly the same logic with another workflow and it works fine. I don't understand what is happen in this case.

 

Can someone help me with this? I've been looking in community and all articles says that are something wrong with mail scripts or templates, but I'm using the same from other proccess that is working.

 

Preview Notification (on edit notification):

Rufino_0-1698416917879.png

 

Notification:

Rufino_1-1698417039051.png

 

Rufino_2-1698417056337.png

 

Rufino_3-1698417141162.png

 

Workflow - Run Script (Parameter 2):

(function() {
    var localidade = '';
    var email = '';
    var grFac = new GlideRecord('table_name');
    localidade = current.variables.unidade;
    grFac.addEncodedQuery('manutencao=true^unit=' + localidade);
    grFac.query();

    if (grFac.next()) {
        email = grFac.email.toString().replaceAll(";",",");
    }
		
    // return the value to use for Parameter 2
    return email;
}());

 

Preview notification sent:

Rufino_4-1698417852978.png

 

1 ACCEPTED SOLUTION

Problem solved!

I don't know what exactly was wrong, but I just rewrote all variables (without copy and paste) and it works.

Thanks you!

View solution in original post

3 REPLIES 3

RaghavSh
Kilo Patron

This happens when there is some issue with the notification body. What is see from your notification body is that opened_by is missing "_" . Its should be ${opened_by.name}

Also, opened_by should be a reference field.


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn

The variable opened_by is with underscore. This is my notification:

Por favor, leia as instruções abaixo para aceite ou recusa da solicitação de Manutenção Predial.

 

Chegou uma nova solicitação de Manutenção Predial

 

Numero da Solicitação: ${number} 

Tipo da Solicitação: ${item}

Status:  ${state}

Data de Abertura: ${opened_at}

Data de Vencimento: ${sla_due}

Aberto por: ${opened_by}

Beneficiário: ${beneficiario}

Tipo de Manutenção: ${current.variables.tipo_da_manutencao}

Serviço: ${current.variables.servico_desejado}

Unidade: ${current.variables.unidade}

Pavimento: ${current.variables.pavimento}

Localização: ${current.variables.localizao}

Descrição: ${current.variables.descricao}

 

                                                                                                                                                            

Instruções:

Para finalizar o atendimento da solicitação de Manutenção Predial

Responder este e-mail com a palavra Concluído no final do assunto

Exemplo: 

Solicitação: ${number} de ${item} concluído

                                                                                                                                                            

Para Cancelamento da solicitação de Manutenção Predial

Responder este e-mail com a palavra Cancelado no final do assunto

Exemplo: 

Solicitação: ${number} de ${item} cancelado

 

Problem solved!

I don't know what exactly was wrong, but I just rewrote all variables (without copy and paste) and it works.

Thanks you!