Hi,
I have created a chatbot in Copilot studio. This chatbot takes information from user and add it on Sharepoint list. While testing, I figured out that the default created by column shows my name instead of the user who has added a request through chatbot. Could you please guide me how can I change "Created By" (Author) column on sharepoint list at time of creating task?
After creating task, there is no point of changing the created by details as I won't have the requestor's details. Please guide.
Thank you
Hi @Sharmilshah,
A topic should have system variables like User.PrincipalName. You can use that to feed into your flow. After that you can use that principal name to set the author field with a HTTP request.
Below is an example
1. The User.PrincipalName system variable
2. A flow which uses a ValidateUpdateListItem method to update the Author value to the principal name of the user who interacts with the Copilot of the item just created. Based on this article:
URI
_api/web/lists/GetByTitle('@{variables('ListName')}')/items(@{outputs('Create_item')?['body/ID']})/validateUpdateListItem
Body
{
"formValues": [
{
"FieldName": "Author",
"FieldValue": "[{'Key':'i:0#.f|membership|@{triggerBody()['text']}'}]"
}
],
"bNewDocumentUpdate": true
}
Romain The Low-Code...
23
Pablo Roldan
21
stampcoin
10