Select to view content in your preferred language

Sending delayed email with Power Automate and Survey123

2636
12
Jump to solution
06-17-2022 06:54 AM
erica_poisson
Regular Contributor

Hi - 

I am familiar with using Power Automate to do various (simple) things with Survey123 & feature services, however I am using a new connector and am baffled by the error I am receiving. 

Goal: Send an email x days after the date stored in the "File_Complete_Date" attribute field of my data. I am testing with a 2 day delay, but if I can get this to work the delay would be 55 days. 

I want to use the Delay until action to accomplish this, however I receive this error when I test my Flow.

Unable to process template language expressions in action 'Delay_until' inputs at line '0' and column '0': 'The template language expression 'addDays(triggerBody()?[outputs('Convert_File_Complete_Date')],2)' cannot be evaluated because property '{
"body": "6/16/2022 12:00 AM"
}' cannot be selected. Please see https://aka.ms/logicexpressions for usage details.'.

Here is what my Flow looks like, and below is the syntax I am using. 

erica_tefft_0-1655474063607.png

 

 

Convert File Complete Date = 

addSeconds('1970-1-1', Div(triggerBody()?['feature']?['attributes']?['File_Complete_Date'], 1000), 'MM/dd/yyyy')
 
Delay until = 
addDays(triggerBody()?[outputs('Convert_File_Complete_Date')],2)
 
Any suggestions would be appreciated. Also, if this is not the best way to accomplish an email notification 55 days later, I would love suggestions on alternative options! 
Erica
12 Replies
SeanKMcGinnis
Esri Contributor

Good Morning @erica_poisson  - please take a look at the solution to this question and it will explain how you can handle it with current functionality. There is an enhancement request in our backlog to handle the response more gracefully, but I do not have a timeline when they will be implemented.

-sean
Sean McGinnis - ArcGIS for Microsoft 365 Product Manager
0 Kudos
erica_poisson
Regular Contributor

Hi @SeanKMcGinnis  - 

This just results in another failure, unless I am setting it up incorrectly... I have 2 duplicate "Get Data from feature layer" connectors - the second is set to "configure run after has failed". 

There are no results to query on many days so no results will be returned. 

erica_tefft_0-1664801865573.png

Even when I just change my "Apply to Each" to run after the "Get data from feature layer" has failed, the entire flow fails. 

 

Erica
0 Kudos
SeanKMcGinnis
Esri Contributor

@erica_poisson - Can you submit this as a new thread in teh community? This is a very good question and appears to have uncovered a bug or enhancement need and I do not want others not to be able to find it cause it is buried in this thread.

-sean
Sean McGinnis - ArcGIS for Microsoft 365 Product Manager