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 / How to apply VBA Macro...
Power Automate
Answered

How to apply VBA Macro API POST method to HTTP Power automate

(0) ShareShare
ReportReport
Posted on by 56

Hi There,

 

I want to use HTTP on power automate to post a request and get a response from a system.

 

I'm using Excel VBA macro all this time to POST and get a response from one of the BMC ITSM System.

The POST request is in the TEXT/XML format and the response I get is in TEXT/XML.

 

Can someone please advise/help me as to how can I use the same values from the VBA code and put it on HTTP connector (Power automate) ???

 

Below is the VBA code using POST and the request body in TEXT/XML format.

 

VBA CODE (POST Method)

Sub GetTickets()

    Dim myHTTP As New MSXML2.XMLHTTP60

    Dim myDom As New MSXML2.DOMDocument60

    Dim myXML As String

    Dim myServer As String

   

    ''myDom.LoadXML (myXML)

    myDom.Load "C:\Users\pingalir\Downloads\Saopui\GetTicket.xml"

    myServer = "https://XXXXX.####.com/arsys/services/ARService?server=onbmc-s&webService=HPD_IncidentInterface_WS"

    myHTTP.Open "POST", myServer, False

    myHTTP.setRequestHeader "SoapAction", "HPD_IncidentInterface_WS"

    myHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"

       

       

    myHTTP.send (myDom.XML)

    MsgBox myHTTP.responseText

   

End Sub

 

Below is the myDom Load file has the body of the request :

 

<?xml version="1.0"?>

-<soapenv:Envelope xmlns:urn="urn:HPD_IncidentInterface_WS" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

 

-<soapenv:Header>

 

-<urn:AuthenticationInfo>

<urn:userName>UserNameXXX</urn:userName>

<urn:password>PasswordXXX</urn:password>

</urn:AuthenticationInfo>

 

</soapenv:Header>

-<soapenv:Body>

 

-<urn:HelpDesk_Query_Service>

<urn:Incident_Number>INC00001234567</urn:Incident_Number>

</urn:HelpDesk_Query_Service>

 

</soapenv:Body>

</soapenv:Envelope>

Categories:
I have the same question (1)
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    Just use the HTTP action and supply the same values, something like this:

    2021-08-23_00-35-46.png

    The responses from the method will be in the outputs from the action.

  • Krisslee6 Profile Picture
    56 on at

    Hi Paulie,

     

    Thank you for your response.

    Let me try and keep you updated about the Response results.

     

    Regards,

    RK

  • Krisslee6 Profile Picture
    56 on at

    Hi Paulie,

     

    I have tried but it gives an error saying " enter a valid URL". But the URL is correct as the same URL, headers & XML body is executable on SOAP UI. Error screen shot attached

     

    Krisslee6_0-1630926199193.png

     

  • Paulie78 Profile Picture
    8,422 Moderator on at

    You have the URL as remedyprop which is not a valid domain. So the error is correct.

  • bamalex78nn Profile Picture
    2 on at

    good afternoon!
    i am trying to join via GetTicket.xml file but getting VBA error "internal server error"
    what could be the problem?
    There is also a question - how to make a cycle that will receive information on different inc?
    thank you in advance!

    1.PNG

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

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard