Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Error when using the "Get an image, file or document (V3)" step in Power Automate

Posted on by 4
I created a custom API in BC to expose a blob field in a prepopulated custom table. The blob field contains a pdf file. I've tested this and it is all correctly populated. Now I am trying to get that blob field through the /Get an image, file or document (V3)/ step in Power Automate. I am getting an error message when I test it. The error message is: /The specified stream URI is not a valid Business Central stream URI/.
 
I am not sure if there is anything else in BC that I need to configure to make it a valid URI. Below is the code view for the Power Automate step:
 
{ /type/: /OpenApiConnection/, /inputs/: { /parameters/: { /bcenvironment/: /TESTNEW2/, /company/: /01d598d5-0d70-ed11-8c34-6045bd794679/, /dataset/: /CS/CS/v2.0/, /blobnavigationpath/: /siRs/pdfReport/ }, /host/: { /apiId/: //providers/Microsoft.PowerApps/apis/shared_dynamicssmbsaas/, /connection/: /shared_dynamicssmbsaas/, /operationId/: /GetBlobFromNavigationV3/ } }, /runAfter/: { /Get_record_(V3)_1/: [ /Succeeded/ ] } }
 
And below is the properties for the API:
    APIGroup = 'CS';
    APIPublisher = 'CS';
    APIVersion = 'v2.0';
    ApplicationArea = All;
    Caption = 'salesInvoiceReportAPI';
    DelayedInsert = true;
    EntityName = 'SIR';
    EntitySetName = 'SIRs';
    PageType = API;
    SourceTable = SalesReport;
  • FredrikDeGovia Profile Picture
    FredrikDeGovia 2 on at
    Error when using the "Get an image, file or document (V3)" step in Power Automate
    Hi! 
    I'm currently trying to achive the same as you. Trying to create my own version of PdfDocument api and using it in pa. And I can navigate to the api in "Get an image, file..." action but I cant get the blob out of it. I can on the other hand publish an api with the blob exposed as an BASE64 string, or text in AL lingo, but then i run in to the problem with encoding as an file again. Which i probably can via a compose action. But its not ideal and bit to techie-solution for PA imho. 
     
    Has anyone successfully managed to expose and retrieve a custom blob via "get an image..." action? 
  • Error when using the "Get an image, file or document (V3)" step in Power Automate
    By the way, I had to create my own API because the standard API salesInvoices/pdfDocument/pdfDocumentContent is not able to generate for posted Sales Invoices. I know it should agreggate both unposted and posted but it is not able to for some reason, it could be a bug, but that's beside the point. Ultimately, I need to know how to roll my own API and get past this error message: The specified stream URI is not a valid Business Central stream URI.
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 9,942 Most Valuable Professional on at
    Error when using the "Get an image, file or document (V3)" step in Power Automate

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans