cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AhmadH
Level: Power Up

Update Task Status after sending mail reminder(with dynamic site link)

hi,

 

i have a daily scheduled flow, gets links of many sites (get items 1), then get tasks from each site (get items 2, based on apply to each value from get items 1) and process some functions.

i need to focus on the sending reminder to start a task, the trigger i use here is when all the predecessors are done.

i need to add after sending the mail, to update the task status to "in progress" instead of "not started".

knowing that site link is a dynamic value from the get items 1, "update" item don't help as it don't drill down to show me the task properties that i can change except if i put the exact link of a site.

 

i never used "send HTtp request" to sharepoint function and never used "Json", so please try to be detailed 🙂

tried the below in JSON but didn't work, also tried putting the same in HTTP REQUEST but looks i can't fill the headers and code properly!

 

in short words, the flow should send a mail reminder when all predecessors are done and its status is NOT in progress (which is working) , also need it to update the task as in progress (so it don't send a mail everyday saying task started)

 

  • {F39F007E-02B3-E911-BFC5-9061AE37BD41}
    • not sure if thats a unique value, as i copied the peek code from update item then tried to change the link, shall i leave this GUID blank? ("")
  • items('Apply_to_each_16')?['Project_x0020_subsite_x0020_Link']
    • that should get the site link as: https://XXXXX.sharepoint.com/teams/XX MAIN SITE XX/XXX SUBSITE NAME XX/XXX SUB-SUB-SITE NAME XX
  • Project tasks'
    • Thats a fixed list name in all subsites where it contains the tasks i need to udpate.
  • items('Apply_to_each_3')?['ID']
    • that should return the task ID the flow is working on.

 

{

    "inputs": {

        "host": {

            "connection": {

                "name": "@parameters('$connections')['shared_sharepointonline']['connectionId']"

            }

        },

        "method": "patch",

        "body": {

            "Title": "",

            "Status": {

                "Value": "In Progress"

            },

            "PercentComplete": 0,

            "Critical": false,

            "Priority": {

                "Value": "(2) Normal"

            },

            "SyncedProjectGUID": "{F39F007E-02B3-E911-BFC5-9061AE37BD41}"

        },

        "path": "/datasets/@{encodeURIComponent(encodeURIComponent(items('Apply_to_each_16')?['Project_x0020_subsite_x0020_Link']))}/tables/@{encodeURIComponent(encodeURIComponent('Project tasks'))}/items/@{encodeURIComponent(items('Apply_to_each_3')?['ID'])}",

        "authentication": "@parameters('$authentication')"

    }

}

 

 

Capture.PNGCapture2.PNG

2 REPLIES 2
AhmadH
Level: Power Up

Re: Update Task Status after sending mail reminder(with dynamic site link)

Adding the error message, sorry if its so basic 🙂 but i don't know how to use JSON

 

{
"status": 412,
"message": "The request ETag value '' does not match the object's ETag value '\"c4ecXXXXX83-42ad-a06f-eeeXXXX8a,5\"'.\r\nclientRequestId: 52eXXXX17a-ab2b-d19XXXX9\r\nserviceRequestId: 5fXXX-50c6-9XXXX6-0XXXX68",
"errors": [
"-1",
"Microsoft.SharePoint.Client.ClientServiceException"
]
}
Community Support Team
Community Support Team

Re: Update Task Status after sending mail reminder(with dynamic site link)

Hi @AhmadH ,

 

On which step do you get the error message “The request Etag value doesn’t match the object’s Etag value”?

 

By the way, the error message “cannot evaluate the parameter ‘path.$.dataset’ at design-time” means that the token is using the dynamic content are expressions which evaluate only at runtime, so during design time i.e. when the flow is being created, the values of the dynamic contents are not available.

 

You may need to either select from the dropdown or type in correct value in those fields for dynamic values to work during design time.

 

Best regards,

Mabel

 

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

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,909)