Setting up an Email Endpoint
Zoe Baldwin
What is an Email Endpoint?
Email Endpoints are a type of Actionflow that run in response to an incoming email and can read data into tables. They include the ability to handle attachments and save these to a file table.
For the full list of Email Endpoint Properties, see Email Endpoint Properties.
How does an Email Endpoint work?
- An Email Account must be set up in your application to receive incoming emails. See Email Account Integration for an example.
- The email account setup must include:
- Type: choose Inbound
- On Email Received: choose Trigger an email endpoint actionflow
- Email Endpoint Action: choose your
Email Endpoint
- The email account setup must include:
- To save the emails, a
Table must be created with appropriate attributes for the headers on the incoming emails, e.g. id, from, to, cc, subject, body, folderId
- To allow PhixFlow to save attachments, a
File Table must be created
- The above Table and File Table must have a relation on an ERD, see Relationship
- Upon receiving an email, the
Email Endpoint will run and perform the action(s) as specified within the Email Endpoint Actionflow, such as saving each incoming email as a record in a table
- If saving to a table, each received email saves as a separate record
Creating an Email Endpoint
Email endpoints must be made using the specific option on the Actionflow homepage to ensure the set of predefined input parameters are configured on the
incoming connection point.
- Create a new
Email Endpoint on the
Actionflow homepage using the
option
- Set a unique name and provide a useful description
- Email Endpoints contain a number of preconfigured input parameters, e.g. to, subject, from, bcc, body, etc. and each has a set Data Type
- Additional attributes can be added to the
input connection point which will obtain the value from a header with the same name on the incoming email(s)
- Note: Any '-' characters are removed from the name and the names are case insensitive
- Additional attributes can be added to the
- Configure the endpoint to perform the required tasks on receiving of incoming emails, for example, save all records to a
Table, see Save Action Configuration
- If saving any of the attributes to a table, they must be in a format that can be saved by PhixFlow - do the following steps depending on your PhixFlow version:
- In PhixFlow 12 and older: For any attributes with a Type of Structured Data (e.g. to, from), use the listToString function in a
Calculate action between the
input and
Save action to convert these incoming values
- In PhixFlow 12.1+: For any attributes with a Type of Structured Data (e.g. to, from), click
input under Connections and in the Input Parameters section, double-click the attribute to change the Data Type to String using the drop down menu
- In PhixFlow 12 and older: For any attributes with a Type of Structured Data (e.g. to, from), use the listToString function in a
Email Endpoints cannot contain Open Screen actions, output connection points, lookups or phases.
Saving Attachments
Attachments can be saved in a separate File Table.
- On the Email Endpoint, click
Properties in the toolbar to open the settings on the right
- For the full Properties list, see Email Endpoint Properties
In the Basic Settings, in the Save Attachments to field, set the File Table to save incoming email attachments to
- A new
File Table can be created by clicking the
icon or choose an existing table using the
icon or selecting from the drop down list.
- When creating a File Table to save attachments to, a folderId attribute is automatically created
- A new
Failures
If the Email Endpoint fails, any incoming attachments will still be saved to the specified File Table.
If no location is specified in the Save Attachments to field, attachments will not be saved.
In PhixFlow 12.1+, any emails processed by Email Endpoints or
File Exporters will appear in the Inbound Emails tab on the
System Console.
Additionally in PhixFlow 12.1+, email endpoint actions that fail will display as an error in the System Console and have an option to retry the action whereby the email account that processed that email will attempt to process it again. Note, this may cause it to run a different email endpoint action if the email account's configuration has been changed.
Linking Emails and Attachments
The folderId attribute that is automatically created on new File Tables is used to link an email to its attachments.
- After receiving an incoming email with attachments:
- A value will generate for the folderId attribute on the
Table where the email records are saved for each email received
- A value will generate for the folderId attribute on the
File Table where the email attachments are saved for each email received
- A value will generate for the folderId attribute on the
Displaying Emails
Emails can be displayed using a Grid view.
Emojis in Emails
If the database collation for the PhixFlow system does not support certain Unicode characters they will be removed from the body of the incoming emails.
Worked Example
Coming Soon.
If you require support, please contact PhixFlow Support via either:
-
Support Centre
Contact PhixFlow
These options are available in Design Mode under the
Administration menu in the top right of PhixFlow.