Mautic Community Forums

add token in email send

Hi, just discovering Mautic, great ! I was wondering if it is possible to add a token in email send to new subsciber on a campaign, like Hello {name}

Thank you


Hi, just discovering Mautic, great ! I was wondering if it is possible to add a token in email send to new subsciber on a campaign, like Hello {name}
Thank you

Absolutely! If you are using the regular editor these are some sample tokens (I’m using 1.x still):

a. {webview_url} – this is the URL to “view the email online”
b. {unsubscribe_url}
c. {leadXYZ – by typing “{lead”, a dialogue will popup showing you the available items for that lead

1 Like

Great, thank’s for this. When typing {name you can then add {contactfield=firstname}‍
Very good !

1 Like

Hi! I have a list of contacts who have both emails and Phone numbers. I need to send out personalized emails and messages to these contacts. I want the email version - view in browser url to be mentioned as a link in the text message going to these contacts. Tried {webview_url} and {webview_text} in the text message, but that doesn’t seem to work! :frowning:
Can anyone please help me out here?

Hi there @Mauticuser07 and welcome to the Mautic Community Forums!

Can you explain what you mean by those tokens not seeming to work?

You’re right when you mention {webview_text} (shows the text - e.g. ‘click here to view online’ or whatever you’ve set) or {webview_url} (shows the link - usually wrapped around some text or a button etc).

Note, when testing make sure you send an actual email rather than a test (e.g. make a segment, add yourself, and then send to the segment) so that the actual tokens are created.

Hi @rcheesley.Thanks for your reply!

It works perfectly well in emails, but i also need to send a text message to the contact with a link where he will be redirected to the view in browser url of the email he receives. Can you please tell me how i can insert the token in a text messsage?

I found an old feature request here: and a query here: Tokens in SMS asking about tokens.

Have you tried using a normal token (e.g. first name) and does that work? Does the unsubscribe one not work? It would be helpful to know what the errors are or what happens in your tests.

Yes, tried {contactfield=firstname} in the text message and that worked! However, what i noticed in the webview url for different customers is the base url remains same and is followed by probably the customer token/id. I’m not able to figure out the variable that stores customer token/id.
If we get identify that variable, it would definitely work!

View in browser:{variable}


I’m not sure why you’d need to do that, do you mean that the view in browser/unsubscribe tokens are not working when sent via text message?

To explain this better - We have three email campaigns X, Yand Z. Around 150 customers belong to campaign X, 200 contacts - campaign Y, 350 contacts - campaign Z.

All contacts should receive their respective emails and text messages (with link redirecting to the view in browser version of emails they receive).

Inserting {webview_url} in the text message does not work - tried it

I guess it wouldn’t because, why would you want a web-view of a text message? Does the preference centre/unsubscribe link work though? That’s the one you’d want to allow people to manage their preferences or make changes to what communications they receive from you.