web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trouble pulling ShareP...
Power Automate
Unanswered

Trouble pulling SharePoint Data.

(0) ShareShare
ReportReport
Posted on by 50

Hello all, 


I'm trying to pull data from a SharePoint list to send automated emails a selected intervals however, I'm having some trouble pulling the data. 

 

I'm trying to use a compose card to pull data from SharePoint to send automated emails at certain intervals. 

1. formatdatetime(triggerBody()?['Assign_x0020_Date'],'dddd MM/dd/yyyy')

2. formatdatetime(triggerBody()?['Deadline_x002f_Date_x0020'],'dddd MM/dd/yyyy')

 

I've tried to use the two expressions above as compose cards. The SharePoint data consists of 6 columns: Title, Email, AssignDate, Reminder 1 , Reminder 2, DeadlineDate. I'm trying to create the compose cards as AssignDate and DeadlineDate so I can put them in the body of the email as dynamic data. Sample below:

 

Delay Until Card - Reminder 1 

Send Outlook Email Card:

Hello, "Title" (dynamic data from SharePoint list)

 

This is your reminder to update the ticket status 

The ticket was assigned on "AssignDate" (dynamic data from SharePoint - Compose 1) 

The ticket resolution deadline is "DeadlineDate" (dynamic data from SharePoint - Compose 2) 

 

Any suggestions? I want to ensure the time and date format are MM/DD/YYYY

Note: please disregard the fact that there is no email field in SharePoint and that the wording is different in the email body.

 

SP.PNGFlowEd.png

Categories:
I have the same question (0)
  • RP2 Profile Picture
    50 on at

    This is the error I'm receiving at the first compose action: 

     

    InvalidTemplate. Unable to process template language expressions in action 'AssignDate_(Compose)' inputs at line '1' and column '2784': 'The template language function 'formatdatetime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
     
     
     
  • sudharsan1985 Profile Picture
    1,325 on at

    Hi @RP2 

    I was able to replicate your scenario, below are the two screenshots, one with the success and another with the failure message same like yours.

    Flow Res DateTimeSuccess.png

     Flow Res DateTimeFailure.png

     The failure happens when I saved an item with the empty value for the 'AssignDate' field. Check whether the field is empty or not, if you are sure that all the items has the value for the field, then check the internal name of the field by navigating to the list settings and click on the field name, you can find the actual internal name at the end of the URL address. Please verify and let us know.

     

    Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
    -Sudharsan K...

     

     

  • Verified answer
    v-alzhan-msft Profile Picture
    on at

    Hi @RP2 ,

     

    Please take a try to create flow was my screenshot below:

    1.png

     

    Expression in the Compose 3:

    formatDateTime(outputs('Compose'),'dddd MM/dd/yyyy')

     

    Expression in the Compose 4:

    formatDateTime(outputs('Compose_2'),'dddd MM/dd/yyyy')

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • RP2 Profile Picture
    50 on at

    @v-alzhan-msft 

     

    Thank you so much! That seemed to do the trick. My only other question is how can I incorporate the time into my email? 

     

    I've attached the images referencing my issue. My Flow is extracting the date in the proper format from my SharePoint and being sent in an email (ex. Tuesday 4/14/2020); however, I would like to include the time for that date as well if I can. I am currently on EST. I do have to do some modification on the SharePoint side. For example, when I want to send a message at 12:30PM EST I need to have the notification in SharePoint for 9:30AM, I assume this is because it's using UTC. Any suggestions on how to fix the following would be appreciated.

     

    1. How to get SharePoint to recognize standard EST (as of right now I need to set the reminder 3 hours before I actually want it to send. Ex. Set reminder 1 in SharePoint for 9:30AM and I will receive the email at 12:30PM EST.)

    2. How to attach the time to my emails (right now I'm getting something like "You will receive a second reminder on Wednesday 04/08/2020." However, I would like it to say "You will receive a second reminder on Wednesday 04/0/2020 at 4:00PM" or whatever the time may be. 

     

    Thank you for your help! 

    Ticket Example.PNG

     

    InkedSP example_LI.jpg

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard