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 / Updating Timeline with...
Power Automate
Suggested Answer

Updating Timeline with Activity

(0) ShareShare
ReportReport
Posted on by 12
Hello
I require guidance on a power automation I have created for my business. The main automation is functioning correctly. It performs a lookup against a subscription table and sends an email to each customer if any subscriptions are due within the next 30 days.
 
This part of the automation is working as intended. However, I want to post an update to the account record timeline to indicate a reminder has been sent to the customer as an audit trail.
 
It does create a task in Dynamics but it is not associated with the customer’s account record because it does not fill in the regarding field. I am unsure where I am going wrong and tried several methods but nothing seems to work. If I looked at the output when running the automation, I can see the account GUID for each customer's account in the output
 
Here the code for the process
 
{
    "inputs": {
        "host": {
            "connectionName": "xxxxxx",
            "operationId": "CreateRecord",
            "apiId": "xxxxxxx"
        },
        "parameters": {
            "entityName": "tasks",
            "item/subject": "TEST: Your Subscription is Renewing Soon",
            "item/description": "30 day renewal reminder email has automatically been sent to @{items('Apply_to_each')?['account/emailaddress1']} on @{formatDateTime(utcNow(),'dd MMM yyyy HH:mm')}.",
            "item/regardingobjectid_account_task@odata.bind": "@{items('Apply_to_each')?['_xxx_account_value']}"
        },
        "authentication": "@parameters('$authentication')"
    },
    "metadata": {
        "operationMetadataId": "xxxxxx"
    }
}
 
Regards
I have the same question (0)
  • Suggested answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at
     
    To populate the Regarding field, in the action that creates the record in the Task table, set the following for the Regarding input field:
     
     
    /accounts(<AccountGUID>)
     
    , where <AccountGUID> should be dynamic content that references the Account GUID for the customer.
     
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • SMS-Martin Profile Picture
    12 on at
    Thanks @BCBuizer
     
    I have updated the Regarding (Accounts) to /accounts(@{items('Apply_to_each')?['_xxx_account_value']})
     
    and now get this error 
     
    The supplied reference link -- /accounts() -- is invalid. Expecting a reference link of the form /entityset(key).
     
    Regards
     
  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at
     
    Based on the provided error message, it seems the reference to the Account GUID resolving a blank value: there is nothing between the parenthisis.
     
    This means either the value is missing in the referenced action, or the expression is not correct. If you can share the expression and a sample of the output of the referenced action, maybe I can help determine which of the two is causing the error.
     
    Regardless, there is a way to prevent blank values from causing an error, but that does mean no relation with the account is saved:
     
    if(
      equals(
        <AccountGUID>,
        null
      ),
      null,
      concat(
        '/accounts(',
        <AccountGUID>,
        ')'
      )
    )
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • SMS-Martin Profile Picture
    12 on at
    Thanks @BCBuizer
     
    The output from the action when testing is 
     
    {
    "error": {
    "code": "0x80060888",
    "message": "The supplied reference link -- /accounts() -- is invalid. Expecting a reference link of the form /entityset(key)."
    }
    }
     
    The expression on the post to timeline is
     
    /accounts(@{items('Apply_to_each')?['_sms_account_value']})
     
    The initial list rows which filters the subscriptions expiring to send the email code is, this the goes through an array to send out the email and update the xxx_remindersent to true, it should, then post a update the customers account timeline as a task, the task is created but it not filling in the Regarding (Account) field with the customers account name to associate it with the account
     
    {
    "inputs": {
    "host": {
    "connectionName": "xxxx",
    "operationId": "ListRecords",
    "apiId": "xxxx"
    },
    "parameters": {
    "entityName": "xxx_productses",
    "$select": "xxx_domain,xxx_nextbillingdate,xxx_name,xxx_dotorenew",
    "$filter": "xxx_nextbillingdate ge @{addDays(utcNow(),28)} and xxx_nextbillingdate le @{addDays(utcNow(),31)} and xxx_duration eq 1 and sms_billingplan eq 1 and xxx_remindersent eq false and statecode eq 0 ",
    "$expand": "xxx_Account($select=name,emailaddress1)"
    },
    "authentication": "@parameters('$authentication')"
    },
    "runtimeConfiguration": {
    "paginationPolicy": {
    "minimumItemCount": 5000
    }
    },
    "metadata": {
    "operationMetadataId": "xxxxxx"
    }
    }
     
     
    Regards
  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at
     
    Thanks for sharing the code of the List Rows action. What I suspect may happen is that the sms_account column gets dropped from the output because it was not included in the selected columns. Please try adding it and test again.
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • SMS-Martin Profile Picture
    12 on at
    Thanks @BCBuizer
     
    Thanks for all the help so far, can you advise how I can do this, I did try but I'm getting the same error
     
    Regards
     
  • SMS-Martin Profile Picture
    12 on at
    Hi, I'm still having issues with this if anyone knows how I can overcome them I would really appreciate it
     
    Regards
  • Suggested answer
    CU20051321-2 Profile Picture
    4 on at

    Hi @SMS-Martin,

    The problem is that Dataverse is receiving:
    /accounts()

    This means the GUID value is blank at runtime.
    Since you are using:
    "$expand": "xxx_Account($select=name,emailaddress1)"

    the Account GUID is not included in the expanded object, so this expression returns empty:
    items('Apply_to_each')?['_sms_account_value']

    To fix this, include the Account ID in your expand:
    "$expand": "xxx_Account($select=accountid,name,emailaddress1)"

    Then, use the following for the Regarding field:
    "item/regardingobjectid_account_task@odata.bind": "/accounts(@{items('Apply_to_each')?['xxx_Account']?['accountid']})"

    This should correctly link the created task with the Account record timeline.

    I hope this helps! If you found the reply useful, please consider giving it a thumbs up. If it resolved your issue, mark it as the Verified Answer.
  • Suggested answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at
     
    Most likely, all you have to do is to add the column to the Select columns parameter of the List rows action:
     
     
     
    Since you have entered the xxx_domain,xxx_nextbillingdate,xxx_name,xxx_dotorenew rows there, the '_xxx_account_value' reference will return a blank since the xxx_account column is not included. Power Automate will allow you to reference it as dynamic content, so you may be mislead to think your it will work but, as you are experiencing, it is not.
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • SMS-Martin Profile Picture
    12 on at
    Hello @CU20051321-2 
     
    Thanks this has sorted it :)
     
    Thanks to everyone else for there input on this really appreciate it
     
    Regards

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard