Provide host name cannot be resolved sending http request to TRIM service api from Power apps cloud flow

Hi 

I am trying to send HTTP request from Power apps cloud flow to TRIM service api.

I am seeing error like "provided host name cannot be resolved. "

When I use the same url from browser it works. 

Please help if there is any way I can access service api from Cloud flow in Power Automate

Thanks a lot in advance

Nalina

  • 0

    Sounds like your CM instance is on your intranet and not accessible from internet (cloud).

  • 0 in reply to 

    Thanks Sander yes it is. Is there anyway we can connect intranet server to Powerapps, can we use connection gateway

  • 0 in reply to 

    A connection gateway is one of many ways to do this, but it may be best to talk to the security officer, architect, IT department to discuss that they will allow and are willing to have implemented.

  • 0 in reply to 

    Hi Sander, 

    I managed to set up a gateway and connect to HP trim from Power automate.  I was able to post a test record using json like below. 

    However, I am not able to post a file with that test record I successfully posted first. I am using multi-part form data to post the file along with the record information. but I am getting error like "Record Type required to create instance of Record"

    What should I pass for Record Type in multi-part form-data. Without the file it works with this RecordRecordType": {
    "Uri": 1523
    },

    With file this is not working. 

    Please let me know if you have any suggestions to test this.  Thanks Nalina

    Json of test records which I posted without the file, which was successfully created in content manager. 

    {
    "RecordContainer": "2454722",
    "RecordTitle": "Test Title from powerapps",
    "RecordRecordType": {
    "Uri": 1523
    },
    "Fields": {
    "ClientID": 123,
    "ClientDocumentType": {
    "Value": "Internal"
    },
    "DateReceived": {
    "Value": "16-09-2024"
    }
    }
    }

    Multi-part formdata which gives error "Record Type required to create instance of Record" is like below. 

    File content I am getting from sharepoint in the below it appears like "@{outputs('Get_file_content')?['body']?['$content']}"

    {
    "$content-type": "multipart/form-data",
    "$multipart": [
    {
    "headers": {
    "Content-Disposition": "form-data; name=\"RecordContainer\""
    },
    "body": "2454722"
    },
    {
    "headers": {
    "Content-Disposition": "form-data; name=\"RecordTitle\""
    },
    "body": "Post file from power flow"
    },
    {
    "headers": {
    "Content-Disposition": "form-data; name=\"RecordRecordType\""
    },
    "body":" Pre-TRIM Box"
    },
    {
    "headers": {
    "Content-Disposition": "form-data; name=\"Fileds\""
    },
    "body": "{\r\n \"ClientID\": 123,\r\n \"ClientDocumentType\": {\r\n \"Value\": \"Internal\"\r\n },\r\n \"DateReceived\": {\r\n \"Value\": \"16-09-2024\"\r\n }\r\n }"
    },
    {
    "headers": {
    "Content-Disposition": "form-data; name=\"File\"; filename=\"TestEnduringGaurdian.pdf\""
    },
    "body": @{outputs('Get_file_content')?['body']?['$content']}
    }
    ]
    }