Post a Teams message, when Excel online criteria is met.

%3CLINGO-SUB%20id%3D%22lingo-sub-2244234%22%20slang%3D%22en-US%22%3EPost%20e%20teams%20message%20every%2C%20when%20Excel%20online%20criteria%20is%20met.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2244234%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20idea%2Fproblem%20I%20would%20like%20to%20solve%20is%20to%20post%20a%20message%20everyday%20if%20a%20criteria%20is%20met.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETh%20Excel%20online%20Sheet%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22excel%20bursdag.PNG%22%20style%3D%22width%3A%20706px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F268204i531116B3F1A0F406%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22excel%20bursdag.PNG%22%20alt%3D%22excel%20bursdag.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EColumn%20%22Bursdag%20i%20dag%22%20(Birthday%20today)%20is%20set%20to%20yes%20ithe%20person%20have%20birthday.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20flow%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScheduled%20to%20run%20everyday%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheck%20if%20the%20column%20is%20%22ja%22%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bursdag%20i%20dag.PNG%22%20style%3D%22width%3A%20993px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F268209iF641CFD858F6A389%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22bursdag%20i%20dag.PNG%22%20alt%3D%22bursdag%20i%20dag.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPost%20a%20message%20at%20Teams%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22poste%20bursdag.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F268210i4E041E603F096117%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22poste%20bursdag.PNG%22%20alt%3D%22poste%20bursdag.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20Guess%20the%20way%20I%20check%20column%20value%20in%20Excel%20is%20wrong%20here.%20Is%20this%20scenario%20possible%3F%20If%20yes%2C%20how%20do%20I%20configure%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20Regards%3C%2FP%3E%3CP%3E-%20Geir%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2244234%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Regular Contributor

Hi,

 

The idea/problem I would like to solve is to post a message everyday if a criteria is met.

 

Th Excel online Sheet

excel bursdag.PNG

 

Column "Bursdag i dag" (Birthday today) is set to yes ithe person have birthday.

 

The flow:

 

Scheduled to run everyday

 

Check if the column is "ja"

bursdag i dag.PNG

 

Post a message at Teams:

poste bursdag.PNG

 

I Guess the way I check column value in Excel is wrong here. Is this scenario possible? If yes, how do I configure it?

 

Best Regards

- Geir

 

2 Replies

@Geir Hogstad

 

Solved it, changed to "List Rows.."

 

Best Regards

- Geir

@Geir Hogstad I would do it a different way so you don't have to manually check the spreadsheet and add in if it's the person's birthday - you can get the flow to check that.

 

Make sure your spreadsheet has the full date of the next birthday and that the rows are formatted as a table:

0-Table.png

 

In your flow, as you've realised, you need to use the List rows present in a table action:

 

1-Flow.png

 

Then add an apply to each and select value from the dynamic content.

 

Next add 2 Compose controls:

1.  I've renamed the first one to ConvertedDate and its purpose is to convert the date from Excel's integer format to something you can use in the flow. So you need an expression which will be:

formatDateTime(addDays('1900-01-01', add(int(items('Apply_to_each')?['NextBirthday']),-2)), 'yyyy-MM-dd')

 

When you are comparing dates you must always have them in yyyy-MM-dd format.

 

2. The second Compose, called Today, gets today's date and puts it into yyyy-MM-dd format for the comparison. The expression is 

formatDateTime(utcNow(),'yyyy-MM-dd')

 

2-Flow.png

 

Finally, add a Condition to check if the converted date is the same as today's date. In the left field select the ConvertedDate output from the dynamic content, and in the right field select the Today output from the dynamic content.

 

In the green if yes channel add your Teams Post a message action

 

3-Flow.png

 

And this is the result in your Teams channel:

4-Result.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User