cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IS
Frequent Visitor

HTTP Actions

Hello,

I was wondering if someone can help me configuring an HTTP action in Microsoft Flows.

 

I have built a flow in Microsoft Flows where every time a specific person approves a request from someone in company then I want to create a new entry (record) in NetSuite for a specific record type.

 

If I do this using Excel is working fine. (There is a script XMLEndopoint in Netsuite where enables us to post data in XML Format)).

 

When I try to do this using Flows I get 405 method not allowed.

This is the whole HTTP action.

 

I quite new with the Flows.

Thank you in advance.Capture1.JPG

Capture.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
IS
Frequent Visitor

I am posting this solution here for future reference.

 

Everything was correct except one thing which was missing.

 

User-Agent : Mozilla/5.0

 

And the flow worked.

 

Thanks.

View solution in original post

3 REPLIES 3
v-xida-msft
Community Support
Community Support

Hi @IS,

 

Could you please show a bit more about the error message?

 

The 405 error told that the method specified in the Request-Line is not allowed for the resource identified by the Request-URI, in other words, the HTTP verb is not allowed for the specific URI that an HTTP client has requested.

 

Please consider take a try to change the HTTP method into PUT and check if the issue is solved on your side. Besides, please check if you have filled proper url within Uri field of HTTP action.

 

More details about troubleshooting HTTP 405 errors, please check the following article:

Troubleshooting HTTP 405 errors

 

Best regarfds,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
IS
Frequent Visitor

Hello @v-xida-msft

 

Thank you for your response.

I tried PUT method but still it is the same error. I also try to use mozilla's add-on RestClient with the same inputs and it worked. The only thing I noticed was the HTTP connector in MS Flow asking for URI and the Mozilla's is asking for URL. At this point I feel a bit confused regarding URIs and URLs.

 

 

Thank you in advance.

 

My inputs is:

 

METHOD: POST

URI: https://forms.eu2.netsuite.com/app/site/hosting/scriptlet.nl?script=xx&deploy=1&compid=xxxxxx&h=2ccb...

Content-Type: application/xml

Body: <?xml version="1.0" encoding="UTF-8"?>
                    <request>
                        <key>xxxxxxxxxx</key>
                        <operation type="create">
                            <record type="xxxxxxxxxxxxxxxxx">
                                <name>some_value</name>
                                <some_filed>1</some_field>
                                <some_field>5</some_field>
                            </record>
                        </operation>
                    </request>

 

 This is working when I am using excel vba code or RESTClient.

 

The error I am getting is:

 

 

MethodNotAllowed.
INPUTSOUTPUTS
Status code
405
Headers
Key
 
Value

Content-Type
text/html; charset=UTF-8
 
Body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN"> <HTML> <HEAD> <TITLE>Error 405--Method Not Allowed</TITLE> </HEAD> <BODY bgcolor="white"> <FONT FACE=Helvetica><BR CLEAR=all> <TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all> <FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 405--Method Not Allowed</H2> </FONT></TD></TR> </TABLE> <TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1</i>:</H3> </FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.4.6 405 Method Not Allowed</H4> </FONT><P><FONT FACE="Courier New">The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.</FONT></P> </FONT></TD></TR> </TABLE> </BODY> </HTML>
 
 
IS
Frequent Visitor

I am posting this solution here for future reference.

 

Everything was correct except one thing which was missing.

 

User-Agent : Mozilla/5.0

 

And the flow worked.

 

Thanks.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,047)