Hi All,
We have an existing workflow that uses 3 Outlook Connectors to fetch excel attachments from 3 different mailboxes and save them to a Network drive. This workflow runs daily, fetching excel files from most recent mails and overwriting the existing files with the latest data in the same Network drive.
However, there is an issue - if don't receive one of the expected mails on a given day.
For example, suppose on 7th July we expect 3 mails but receive only 2 -- the workflow still runs, fetching 2 attachments from the current day and 1 leftover from the previous day. This causes the files to be overwritten with incorrect data, which in totally wrong.
To avoid this, I want to implement a check in the workflow. After fetching the attachments, it should verify that all the files have the same date. If all al the attachments are from the same date, the workflow should proceed and create output/overwrite the existing files in our Network drive. If there is any date mismatch, the workflow should stop and send an alert mail notifying that one or more expected files are missing or outdated.
The workflow will be scheduled to run from Alteryx Gallery. We are using Designer and Server version - 2023.2
Requesting your help and suggestions to implement the logic.
I would look at using the Message Tool and using the "Error - And Stop Passing Records Through This Tool" option - you can also turn on "Cancel Running Workflow on Error" in your Runtime settings (Cancel Running Workflow on Error - Alteryx Community) if needed. For the email notification, set up an Event to email when the error occurs (Email Events to notify on Start or Finish)!