Hello again!
Trying to create a flow where paper documents are scanned in, their contents saved to SharePoint and the files are named with a shipment number contained on the paper documents.
The scanner sends the scan to an email address which triggers a flow that saves the attachment to sharepoint.
I have a second flow that is triggered when a document is created in the sharepoint folder. An AI model that extracts a shipment number form the scan image.
The bit I'm stuck on is I now want to rename the scan document to be the same as the shipment number. I have tried using the create file and copy file options but havnt had much luck.
When I did the create file option - it created a file successfully with the shipment number as the name, but it was just a blank file.
When Im trying the copy file, I can figure out how to change the name.
(The teams message is just for testing so that I knew the AI bit was working)
Thanks @reidb - instead of using 'ItemId' I think we need to use another identifier. Try with ID or Identifier outputs from SharePoint instead.
Joe, i tried using the root documents folder, and still no joy. Flow sees file drop, gets ID and passes to HTTP POST request. Test Flow completed successfully.
Here are the raw outputs of the HTTP request:
Joe,
I just tried the root of documents, and still no success, but the flow tested successfully. It is seeing the file drop, getting the ID, and passing to the HTTP request, but never writing out the new xlsx file from the source csv.
Hi @reidb - what you should put in the URI is the name of the document library. By default in many cases is Documents. Here is where you see it in SharePoint:
Have you tried with: _api/web/lists/GetByTitle('Documents')/items(<PUT YOUR FILE ID HERE>)/validateUpdateListItem
Happy new year! 🎇
I am getting an error in "Send HTTP Request" step where the file cannot be found.
My files are actually in a subfolder of "Documents" called TermList
Both Trigger and GET file Metadata work fine to ID the actual file.
All i need to accomplish is to rename the file from xyz.csv to xyz.xlsx - change filetype.
I have tried several iterations of the folder structure in the uri
GetByTitle('Documents/TermList')/items
... ('Shared Documents/TermList')/items
neither work..
error: (with a different file path, but get same error no matter what path i put in)
Power Automate now has a new function called slice. See: Reference guide for expression functions - Azure Logic Apps | Microsoft Docs
Example:
thats worked perfectly thanks!!!
like this?
Hi @adrian-m - congrats on successfully building this automation! 🙂
Apologies for taking some time to response to your last question. The following expression should take care of truncating the first four digits:
substring(Put here the shipping number output, 4, sub(length(Put here the shipping number output), 4))
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional