C# scripts are not supported in the Web app
See the item compatibility table
See also:
Capturing text with a script
An overview of Email Parser scripting
This example show how to capture the first word of the email body with a small C# script. The code is as follows:
using System;
using System;
using System.Text;
using System.Collections.Generic;
using EmailParserBackendApi.ScriptingInterface;
public class MyScriptBasedEmailParser : ScriptBasedParser
{
//
// Modify this method to implement your own text capture
//
public override List ExtractTextFrom(string input_text)
{
List returned_values = new List();
// Get the first word of the incoming email
char[] valid_word_separators = new char[] { ' ', ',', '.', ':' };
string[] words = input_text.Split(valid_word_separators);
returned_values.Add(words[0]);
return(returned_values);
}
}
The script can be edited double-clicking the field “first_word_of_email_body”. But note that we encourage to use a full C# IDE (like Visual Studio) for doing this. This window is meant for just copying the script from the IDE and do minor adjustments:
Processing one email produces the following output: