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 4
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,692 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
    4 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,692 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
    4 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

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 921

#2
Valantis Profile Picture

Valantis 801

#3
Haque Profile Picture

Haque 588

Last 30 days Overall leaderboard