We Use Cookies

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with this.

See our cookie policy.

Automation Action: Message Store Operation

Read a list of message store messages from/to & to/from two email addresses.

Built-In Action

ThinkAutomation stores a copy of each processed message in the Message Store. This action reads a list of message store messages with the same from/to or to/from email addresses and the same subject. This action can also be used to drop the current message and to pause/resume message sources.

Select the Message Store Operation:

Get Current Conversation

This operation returns the conversation for the currently executing message.

Get Another Conversation

This operation returns the conversation between two email addresses with the same subject.

Specify the Between Email Address and And Email Address.

Specify the For Subject.

You can specify the Maximum Items and Maximum Age (Days).

The message store will be searched for all messages where the From and To addresses match either of the Between email addresses and have the same subject (any 'FW:' or 'RE:' subject prefixes will be ignored). Only messages processed within the same Solution will be searched.

In the Return As list select one of:

  • Markdown : A single markdown text string is returned containing all messages.

  • Json : A Json array in the following format:

    
    {
        "Conversation": [
        {
             "Id": "64918ec290ca1b3ae8d9286c",
            "FromName": "Test",
            "ToName": "ThinkAutomation",
            "Dated": "2023-06-20T11:34:26",
             "Message": "Hello",
            "Attachments": ""
          },
          {
             "Id": "64918ec290ca1b3ae8d9286c",
            "FromName": "ThinkAutomation",
            "ToName": "Test",
            "Dated": "2023-06-20T11:34:26",
             "Message": "Hi There!",
            "Attachments": ""
          }
        ]
    }                  
  • CSV : CSV text in the following format:

    
    Id,FromName,ToName,Dated,Message,Attachments
    64918ec290ca1b3ae8d9286c,Test,ThinkAutomation,2023-06-20 11:34:26,Hello,
    64918ec290ca1b3ae8d9286c,ThinkAutomation,Test,2023-06-20 11:34:26,Hello There!,                  
  • HTML: HTML text in the following format:

    
    <div style="display:flex;flex-direction:column;">
      <div style="display:flex;justify-content:flex-start;margin-bottom:5px;">
        <div style="border:1px solid #dee2e6;border-radius:6px;max-width:70%;padding:5px;">
          <p style="margin-top:0;margin-bottom:3px;font-size:11px;color:#595c5f;">Test @ 20/06/2023 11:34</p>
         Hello
        </div>
      </div>
      <div style="display:flex;justify-content:flex-end;margin-bottom:5px;">
        <div style="border:1px solid #dee2e6;border-radius:6px;max-width:70%;padding:5px;">
          <p style="margin-top:0;margin-bottom:3px;font-size:11px;color:#595c5f;">ThinkAutomation @ 20/06/2023 11:34</p>
          Hello There!
        </div>
      </div>
    </div>                  

Select the variable to receive the results from the Assign To list. The result will be blank if there are no messages.

You can use this action if you need to display or send a transcript of a conversation between two email addresses with the same subject.

Getting A Conversation For Web Chat Form Messages.

Enable the Is Web Chat option if you want to read messages saved via the Web Chat message source. For messages saved via a web chat message source, the 'bot' reply is saved to the Automation Return value rather than being a separate message store message. If you enable this option the Automation Return value for each message will be added as the 'reply' message.

Drop Message

This operation will flag the currently executing message to be deleted from the message store database after the Automation completes.

Drop Current Conversation

This operation will delete all previous message store messages where the from/to or to/from email addresses and subject match the currently executing message. The current message will not be deleted. The Assign To variable will receive the number of messages deleted.

Drop Another Conversation

This operation deletes all previous message store messages between two email addresses with the same subject. Specify the Between Email Address and And Email Address. Specify the For Subject. The current message will not be deleted. The Assign To variable will receive the number of messages deleted.

Pause/Resume Message Source

This operation can be used to pause or resume any Message Source within the same Solution. Select the Message Source from the list, this must be within the same Solution as the Automation. The Pause/Resume Message Source operations can be used to conditionally pause/resume Message Sources in addition to any Schedule assigned to the Message Source.

Get Message Source Status

This operation can be used to check the status of any Message Source within the same Solution. Select the Message Source from the list, this must be within the same Solution as the Automation. Select the variable to receive the status from the Assign Status To list. The status returned will be one of: 'Active', 'Disabled', 'Paused' or 'Missing' (if the Message Source has been deleted).