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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an HTTP request t...
Power Automate
Answered

Send an HTTP request to SharePoint returns bad gateway

(0) ShareShare
ReportReport
Posted on by 220

I'm using Paul Murana's YouTube video How to send Automatic Birthday / Anniversary Email using a Power Automate Cloud Flow. Strangely, it works perfectly when I use the Birthday column of my SharePoint list but not the HireDate column. Both are date columns. Any ideas why the HireDate column doesn't work?

 

This works

Aimthedame_3-1706630943736.png

 

This doesn't work

Aimthedame_2-1706630843589.png

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Aimthedame,

     

    Normally these type of queries work with the internal names of the columns.

     

    Have you checked if HireDate column has an internal name of HireDate? The internal name of this column might be different, that could explain why your query is not working.

     

    Here is an article from @ekarim2020 on how to double check/find the internal name of a column:

    https://elliskarim.com/2021/12/20/finding-the-internal-name-of-a-sharepoint-column/

     

  • Aimthedame Profile Picture
    220 on at

    That was the first thing I checked. I should have included that in my post. Sorry!

    Aimthedame_0-1706708170373.png

     

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Aimthedame,

     

    Thanks for checking. What is your HireDate column setup?

     

    Below is an example of the setup I used for testing and a couple of records with a HireDate value. In test only Jane should be returned today.

     

    columnsetup_hiredate.png

     

    What is your exact URI value, is it like the below?

    /_vti_bin/listdata.svc/EmployeeDirectory?$filter=month(HireDate) eq @{int(formatdatetime(utcNow(), 'MM'))} and day(HireDate) eq @{int(formatdatetime(utcNow(), 'dd'))}

     

    I have tried to reproduce your issue in my development environment. It is only returning the Jane list item in my setup without any error and that URI you shared works like expected.

     

    You might want to double check your inputs as well of the HTTP request action. Just to make sure it is compare month with 1 and day with 31 (in case of today's date).

     

    testresult_jane.png

     

     

  • Aimthedame Profile Picture
    220 on at

    I decided to start clean just in case there was corruption somewhere along the line. I performed a Get items and then performed a compose to see the output. HireDate was listed and contained dates for 22 items. Then I checked the HireDate specifically (item()['HireDate']) and received this error.

     

    'The template language expression 'item()['HireDate']' cannot be evaluated because property 'HireDate' doesn't exist, available properties are '@odata.etag, ItemInternalId, ID, Title...

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Aimthedame,

     

    Can you share a screenshot of your latest setup, that will help troubleshooting. Where did you add that expression with the item reference? 

  • Aimthedame Profile Picture
    220 on at

    I tried adding new columns to the list and it does the same thing but when I used Birthday, Modified, or Created it works.

     

    Aimthedame_0-1706719716569.png

     

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Aimthedame,

     

    That is the bad gateway error, the first error.

     

    In your previous reply you mentioned that in one of your checks you got a different error, the one below:

    'The template language expression 'item()['HireDate']' cannot be evaluated because property 'HireDate' doesn't exist, available properties are '@odata.etag, ItemInternalId, ID, Title..

     

    I am interested in that error, that might give me some clues. Can you share a screenshot of that specific error and where you used that item()['HireDate'] expression in your check?

  • Aimthedame Profile Picture
    220 on at

    I finally figured it out! The only difference between the two columns is that two of the list items do not contain hire dates. When I entered dates it worked. Is there a way to leave those blank?

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Aimthedame,


    Yes, you could use a ? character for that as a wildcard in your expression.


    Try:

    item()?['HireDate']

     

  • Verified answer
    Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Aimthedame,

     

    Just realised you want this check in the HTTP request, my bad 😂

     

    Try and add a HireDate ne null check to the $filter, try this instead:

    /_vti_bin/listdata.svc/EmployeeDirectory?$filter=HireDate ne null and month(HireDate) eq @{int(formatdatetime(utcNow(), 'MM'))} and day(HireDate) eq @{int(formatdatetime(utcNow(), 'dd'))}

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard