Variables Overview

Variables can be used to form dynamically the file path or name of files stored on the cloud, according to a received email's information, through the use of evaluation patterns. 

 

Create a New Variable

  1. Access to Mail2Cloud Dashboard.
  2. Click on "Auto filling" in top menu bar.
  3. Click on "Variables".var_topBar.png


  4. Click on  "Create Variable".
    var_new_var.png

  5. Type a name for the new Variable.
    var_name.png

  6. Select the type of value the pattern is going to use to look for a match in your emails. var_regEx.png

    The value can be split (a string that will split the found match in groups where the occurrence happened), regex (a regular expression), contains (a string that will match it's found inside other string) and equal (a string that will match when the exact string is found).
    By selecting a map, once a match has been found, the pattern will run through its key/value structure, searching for a key that matches the result and assigning to the result its value.

  7. Type the string or regular expression to be used to find a match.
    var_whatToMatch.png

  8. Select one or more type of email data for the pattern to try to find a match with the input provided.
    var_select_eval.png

  9. You can select And if Map to activate the use of maps or 'convert to' 
    var_convertTo.png
    By selecting a map, once a match has been found, the pattern will run through its key/value structure, searching for a key that matches the result and assigning to the result its value.
    If you select 'convert to' it will assign the result to a group of the regEx.

    i.e.: regEx: (.*)@domain.com, test string: email@domain.com, 'Type what to convert: ${1}' In this case the groups will be ${0}='email@domain.com', ${1}='email', so the assigned value will be 'email'.

  10. Type a string for the pattern to convert the match to.
    var_whatToConvert.png

Note: We recommend you test every variable after creation, this article will be helpful.

You might be interested in:

Have more questions? Submit a request

Comments

Powered by Zendesk