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 Apps / Creating flow to compa...
Power Apps
Unanswered

Creating flow to compare row in sharepoint list & excel & if no record in sharepoint then send email

(0) ShareShare
ReportReport
Posted on by 130

Hi All,

 

I have a sharepoint list with userid, username, createddate & excel table with userid & username which is sort of the master table which has all the user records. On completing a survey, entry is added in sharepoint list. 

 

I am trying to create a flow which every day will send an email to user who has not taken the survey by comparing the rows from sharepoint list & excel.

 

Could you please help. Any pointers will be really helpful.

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 Moderator on at

    Hi @TheOpeningBat ,

     

    This is a mission for recurrent flow and your topic should be posted on PowerAutomate community 😊, but let me give a try. 

    So, first create a recurrent flow:

    Capture.PNG

    and this is how should look like this flow:Flow.png

     

    Hope it helps !

  • TheOpeningBat Profile Picture
    130 on at

    Thanks @gabibalaban for your response. Will definitely keep in mind next time regarding where to post.

     

    I tried your steps however it failing at the Get Items step with message - The expression \"User Id eq 12345\" is not valid. Creating query failed.

     

    In the Get Items step for the filter query:

    userid eq items('Apply_to_each')['userid'] 

    In the above, can you please tell me - first userid is the column from Sharepoint list & second one is from Excel. Is my assumption correct?

  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    There are some small quotes in the formula:  userid eq '.....' .

    I think you miss it. Please try again

  • TheOpeningBat Profile Picture
    130 on at

    Tried by adding the small quotes still getting the message - The expression \"User Id eq  '12345'\" is not valid. Creating query failed.

     

    User Id in sharepoint list is of type single line of text 

    User # in excel is of number format

     

    Any issue due to this?

  • TheOpeningBat Profile Picture
    130 on at

    Sorry my bad - in the Get items steps - filter query I mispelled the column name. 

     

    Also flow is executing successfully. Just one more thing - in the sharepoint list I have a createddate column as well.  So I need to check if user has completed the survey based on created date. i.e there might be multiple rows for each user based on created date & flow should check whether user has completed survey for each day based on created date.

     

    Any idea how it can be achieved. Many thanks.

  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @TheOpeningBat ,

    Sorry for delay, i have not been notified about your reply.

    Complete your formula as following (using and logic between the two formula) and you'll filter the record from yesterday:

    userid eq 'items('Apply_to_each')['userid'] ' and Created eq 'addDays(utcNow(),-1,'MM/dd/yyyy')'

     

    If my solution meet your expectation please don't forget to mark it as solution.

    Thank you !

  • TheOpeningBat Profile Picture
    130 on at

    Thanks a lot @gabibalaban . Your steps worked perfectly fine. You are a star.

  • bsheehan5013 Profile Picture
    2 on at

    I am trying to take data from an excel spreadsheet and copy it to a SharePoint List without writing any possible duplicates. Below is all the information that I think I can pull in here to try and get assistance. I am erroring out in the last step of my Workflow. Any help will be greatly appreciated.

     

    PM_Workflow.png

    List rows present in a table

    PM_Workflow_List rows present in table.png
    Raw Inputs

    {
    "host": {
    "connectionReferenceName": "shared_excelonlinebusiness",
    "operationId": "GetItems"
    },
    "parameters": {
    "source": "groups/652bf5f1-4a4d-4662-937f-82d4d46ca799",
    "drive": "b!rDUgmCjhR0iKtkQTlrccpfjTxtwswVlPlw4zCpMbke0It16-Sw4ZQ7C9n5NLlTz4",
    "file": "01VCCF7EUVOVZ5OOFFU5C3UQACFYZWKL4Y",
    "table": "{5A249D56-5312-4DAB-948D-BD1E8B7A4FB7}",
    "dateTimeFormat": "ISO 8601"
    }
    }

     

    Get items (Inside 'Apply to Each')

     

    PM Workflow - Apply to each - Get Items.png


    Raw inputs

    {
    "host": {
    "connectionReferenceName": "shared_sharepointonline",
    "operationId": "GetItems"
    },
    "parameters": {
    "dataset": "https://bmwgroup.sharepoint.com/sites/TX-413Hall50ESASL",
    "table": "8236daf6-fc89-46e7-9eaf-4fe19873d635",
    "$filter": "Order_x0020_No_x002e_ eq '3805809'",
    "view": "ae79eb71-e588-4d7b-a216-1d8addd63b11"
    }
    }

    Raw outputs

    {
    "statusCode": 200,
    "headers": {
    "Transfer-Encoding": "chunked",
    "Vary": "Origin,Accept-Encoding",
    "X-SharePointHealthScore": "2",
    "X-MS-SPConnector": "1",
    "X-SP-SERVERSTATE": "ReadOnly=0",
    "DATASERVICEVERSION": "3.0",
    "SPClientServiceRequestDuration": "126",
    "SPRequestGuid": "b99f8c6c-6120-437b-a639-7d371dc83ac7",
    "request-id": "b99f8c6c-6120-437b-a639-7d371dc83ac7",
    "MS-CV": "bIyfuSBhe0OmOX03Hcg6xw.0",
    "Strict-Transport-Security": "max-age=31536000",
    "X-FRAME-OPTIONS": "SAMEORIGIN",
    "Content-Security-Policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com;",
    "MicrosoftSharePointTeamServices": "16.0.0.21715",
    "X-Content-Type-Options": "nosniff",
    "X-MS-InvokeApp": "1; RequireReadOnly",
    "Timing-Allow-Origin": "*",
    "x-ms-apihub-cached-response": "true",
    "Cache-Control": "max-age=0, private",
    "Date": "Fri, 01 Oct 2021 11:17:52 GMT",
    "P3P": "CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"",
    "X-AspNet-Version": "4.0.30319",
    "X-Powered-By": "ASP.NET",
    "Content-Type": "application/json; charset=utf-8",
    "Expires": "Thu, 16 Sep 2021 11:17:52 GMT",
    "Last-Modified": "Fri, 01 Oct 2021 11:17:52 GMT",
    "Content-Length": "833"
    },
    "body": {
    "value": [
    {
    "@odata.etag": "\"1\"",
    "ItemInternalId": "6",
    "ID": 6,
    "Title": "PM FOR EMS DOOR CARRIER #210",
    "Order_x0020_No_x002e_": 3805809,
    "OrderType": "PM01",
    "StartDate": "2021-10-01",
    "DueDate": "2021-10-31",
    "SystemStatus": "REL NMAT PRC SETC",
    "{Identifier}": "Lists%252fSAP%2bPM%2bPull%252f6_.000",
    "{IsFolder}": false,
    "{Thumbnail}": {
    "Large": null,
    "Medium": null,
    "Small": null
    },
    "{Link}": "https://bmwgroup.sharepoint.com/sites/TX-413Hall50ESASL/_layouts/15/listform.aspx?PageType=4&ListId=8236daf6%2Dfc89%2D46e7%2D9eaf%2D4fe19873d635&ID=6&ContentTypeID=0x01006E7C846A87E71144AC0B8EB4E0A5735D00F39161D3BA8D7F4DA2182E3A66A26B49",
    "{Name}": "PM FOR EMS DOOR CARRIER #210",
    "{FilenameWithExtension}": "PM FOR EMS DOOR CARRIER #210",
    "{Path}": "Lists/SAP PM Pull/",
    "{FullPath}": "Lists/SAP PM Pull/6_.000",
    "{HasAttachments}": false,
    "{VersionNumber}": "1.0"
    }
    ]
    }
    }

     

    Condition

     

    PM Workflow - Apply to each - Get Items - Condition - Create Item.png

     

    Raw Inputs

    {
    "expressionResult": false
    }

     

    Condition (If No)
    Create Item

     

    Raw Inputs

    {
    "host": {
    "connectionReferenceName": "shared_sharepointonline",
    "operationId": "PostItem"
    },
    "parameters": {
    "dataset": "https://bmwgroup.sharepoint.com/sites/TX-413Hall50ESASL",
    "table": "8236daf6-fc89-46e7-9eaf-4fe19873d635",
    "item/Title": "PM FOR EMS DOOR CARRIER #210",
    "item/Order_x0020_No_x002e_": "3805809",
    "item/OrderType": "PM01",
    "item/StartDate": "44470",
    "item/DueDate": "44500",
    "item/SystemStatus": "REL NMAT PRC SETC"
    }
    }

     

    PM_Workflow - Error.png

     

    Error:
    OpenApiOperationParameterTypeConversionFailed. The 'inputs.parameters' of
    workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details:
    Input parameter 'item/StartDate' is required to be of type 'String/date'.
    The runtime value '"44470"' to be converted doesn't have the expected format 'String/date'.

     


    Raw Inputs

    {
    "host": {
    "connectionReferenceName": "shared_excelonlinebusiness",
    "operationId": "GetItems"
    },
    "parameters": {
    "source": "groups/652bf5f1-4a4d-4662-937f-82d4d46ca799",
    "drive": "b!rDUgmCjhR0iKtkQTlrccpfjTxtwswVlPlw4zCpMbke0It16-Sw4ZQ7C9n5NLlTz4",
    "file": "01VCCF7EUVOVZ5OOFFU5C3UQACFYZWKL4Y",
    "table": "{5A249D56-5312-4DAB-948D-BD1E8B7A4FB7}",
    "dateTimeFormat": "ISO 8601"
    }
    }

    Get items (Inside 'Apply to Each')
    Raw inputs

    {
    "host": {
    "connectionReferenceName": "shared_sharepointonline",
    "operationId": "GetItems"
    },
    "parameters": {
    "dataset": "https://bmwgroup.sharepoint.com/sites/TX-413Hall50ESASL",
    "table": "8236daf6-fc89-46e7-9eaf-4fe19873d635",
    "$filter": "Order_x0020_No_x002e_ eq '3805809'",
    "view": "ae79eb71-e588-4d7b-a216-1d8addd63b11"
    }
    }

    Raw outputs

    {
    "statusCode": 200,
    "headers": {
    "Transfer-Encoding": "chunked",
    "Vary": "Origin,Accept-Encoding",
    "X-SharePointHealthScore": "2",
    "X-MS-SPConnector": "1",
    "X-SP-SERVERSTATE": "ReadOnly=0",
    "DATASERVICEVERSION": "3.0",
    "SPClientServiceRequestDuration": "126",
    "SPRequestGuid": "b99f8c6c-6120-437b-a639-7d371dc83ac7",
    "request-id": "b99f8c6c-6120-437b-a639-7d371dc83ac7",
    "MS-CV": "bIyfuSBhe0OmOX03Hcg6xw.0",
    "Strict-Transport-Security": "max-age=31536000",
    "X-FRAME-OPTIONS": "SAMEORIGIN",
    "Content-Security-Policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com;",
    "MicrosoftSharePointTeamServices": "16.0.0.21715",
    "X-Content-Type-Options": "nosniff",
    "X-MS-InvokeApp": "1; RequireReadOnly",
    "Timing-Allow-Origin": "*",
    "x-ms-apihub-cached-response": "true",
    "Cache-Control": "max-age=0, private",
    "Date": "Fri, 01 Oct 2021 11:17:52 GMT",
    "P3P": "CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"",
    "X-AspNet-Version": "4.0.30319",
    "X-Powered-By": "ASP.NET",
    "Content-Type": "application/json; charset=utf-8",
    "Expires": "Thu, 16 Sep 2021 11:17:52 GMT",
    "Last-Modified": "Fri, 01 Oct 2021 11:17:52 GMT",
    "Content-Length": "833"
    },
    "body": {
    "value": [
    {
    "@odata.etag": "\"1\"",
    "ItemInternalId": "6",
    "ID": 6,
    "Title": "PM FOR EMS DOOR CARRIER #210",
    "Order_x0020_No_x002e_": 3805809,
    "OrderType": "PM01",
    "StartDate": "2021-10-01",
    "DueDate": "2021-10-31",
    "SystemStatus": "REL NMAT PRC SETC",
    "{Identifier}": "Lists%252fSAP%2bPM%2bPull%252f6_.000",
    "{IsFolder}": false,
    "{Thumbnail}": {
    "Large": null,
    "Medium": null,
    "Small": null
    },
    "{Link}": "https://bmwgroup.sharepoint.com/sites/TX-413Hall50ESASL/_layouts/15/listform.aspx?PageType=4&ListId=8236daf6%2Dfc89%2D46e7%2D9eaf%2D4fe19873d635&ID=6&ContentTypeID=0x01006E7C846A87E71144AC0B8EB4E0A5735D00F39161D3BA8D7F4DA2182E3A66A26B49",
    "{Name}": "PM FOR EMS DOOR CARRIER #210",
    "{FilenameWithExtension}": "PM FOR EMS DOOR CARRIER #210",
    "{Path}": "Lists/SAP PM Pull/",
    "{FullPath}": "Lists/SAP PM Pull/6_.000",
    "{HasAttachments}": false,
    "{VersionNumber}": "1.0"
    }
    ]
    }
    }

    Condition
    Raw Inputs

    {
    "expressionResult": false
    }

    Condition (If No)
    Create Item
    Raw Inputs

    {
    "host": {
    "connectionReferenceName": "shared_sharepointonline",
    "operationId": "PostItem"
    },
    "parameters": {
    "dataset": "https://bmwgroup.sharepoint.com/sites/TX-413Hall50ESASL",
    "table": "8236daf6-fc89-46e7-9eaf-4fe19873d635",
    "item/Title": "PM FOR EMS DOOR CARRIER #210",
    "item/Order_x0020_No_x002e_": "3805809",
    "item/OrderType": "PM01",
    "item/StartDate": "44470",
    "item/DueDate": "44500",
    "item/SystemStatus": "REL NMAT PRC SETC"
    }
    }

    Error:
    OpenApiOperationParameterTypeConversionFailed. The 'inputs.parameters' of
    workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details:
    Input parameter 'item/StartDate' is required to be of type 'String/date'.
    The runtime value '"44470"' to be converted doesn't have the expected format 'String/date'.

     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard