I thought your issue is you wanted to send the e-mail based on the content in an Excel file? There are no Excel actions in your flow. How does what you show relate to what you are asking? Based on the limited information of your use case, you would at a minimum need to do something like this:
Even the above is making a lot of assumptions about your process. It assumes that you have one spreadsheet for the process and that the sales order data is contained in a table. If so, list the rows in the table corresponding to the customer and use a length expression to check the number of rows. Since all tables have a header row, there must be at least one row, so you want to check if there is more than one row. If there is, on the true side you would send the e-mail and on the false side do nothing or something you have not mentioned in your post. The expression in the condition to get the number of rows is: length(outputs('List_rows_present_in_a_table')?['body/value'])
I cannot provide anything more than a high-level suggestion based on the information you have provided. To provide a more accurate recommendation, we need a bit more detail about your current setup. Specifically, it would be helpful to know how the spreadsheet is generated and whether there is more than one spreadsheet involved. Additionally, understanding the organization and content of the spreadsheet is crucial. For instance, where does the email address for sending the email to the customer come from? Is it included in the spreadsheet, or does it come from another source? If it’s from another source, how is the relationship between the spreadsheet and the recipient established? Any additional information about your process will help us give you a more precise and effective solution.
Here are a few more questions that could help clarify the requirements for building this workflow:
- Data Source: How is the sales order data collected and stored before it is placed into the spreadsheet? Is it coming from a database, an API, or another source?
- Spreadsheet Format: Are there specific columns or headers that are always present?
- Trigger Conditions: Are there any specific conditions or criteria that determine when an email should be sent, aside from the presence of data in the spreadsheet?
- Error Handling: How should the workflow handle errors or exceptions, such as issues with data retrieval or email sending failures?
- Customer List: Is the list of customers static, or does it change frequently? How is this list maintained and updated?
- Email Content: Is the email content static, or does it need to be dynamically generated based on the data in the spreadsheet?
- Security and Compliance: Are there any security or compliance requirements that need to be considered, such as data encryption or privacy regulations?
Your best bet will be to start building something and then when you encounter a specific issue, post a question specific the that issue instead of asking how to build a complete solution, which is something these forums are not designed to do.