Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How to send Outbound REST request with multipart/form-data - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to send Outbound REST request with multipart/form-data
KB0745010

How to send Outbound REST request with multipart/form-data


24545 Views Last updated : Sep 5, 2024 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

This article describes the procedure to send an outbound REST request of type 'multipart/form-data'.

Prerequisite

Multipart/form-data requests are supported only via a REST action step in the IntegrationHub which comes as part of the ServiceNow IntegrationHub plugin. 

Procedure

Once the required plugin is activated, follow the below steps to create the flow.

  1. Navigate to "Flow Designer" in the filter navigator. 
  2. Click on "Designer"
  3. Create a new flow by clicking on "New" and selecting "New Flow"
  4. Enter the Name, Application, Description, Run as user and Submit. 
  5. Set the trigger conditions as per your requirement. 
  6. Save

The following steps explain how to create the Action.

  1. In the flow designer UI, click on the "+" icon. 
  2. Click on "New Action". 
  3. Enter the required configuration parameters and click on "Submit".
  4. Create a new step here by clicking on the '+' icon under "Action Outline".
  5. In the list of action step options, select "REST" under "Integrations".
  6. Configure the connection details by defining connection inline or by using a connection alias. 
  7. Under Request details, specify the HTTP Method as POST. 
  8. DO NOT set the Content-Type header. The request will break if you set this. The Content-type is automatically set by the REST Step. 
  9. Under Request Content, select the Request type as "Multipart".
  10. Specify the content of a multiple-part request.
    • For each request part, specify its name, content type, and value. The name can be any valid string and the type can be any valid type. The value must match the content type.
    • When Part type File is used the value MUST be the sys_id of the file in the instance. See documentation for more details.
  11. For type, specify the MIME type of the content. For example, application/json, text/plain, etc.
  12. For attachments, set the type and value as given below:
    1. Type: attachment
    2. Value: The Sys ID of the Attachment record containing the content. You can look up this record in a prior step or define it as an input variable.

This completes the setup required for sending outbound REST requests with type multipart/form-data.

  • A sample of how this would look if you sent 2 text fields and one file field are as follows:

    • It's relevant to note since the REST step is sending an HTTP POST in this example the type is going to be application/json since its a JSON array, but the content-type will be file will be what you set it as. In this sample its application/pdf.
 Note: When you send the requests through a MID Server, you will need to ensure that the user configured for the MID server has read access to the attachment table. Otherwise, both the outbound HTTP log and the ECC queue input will indicate that the particular attachment could not be found.

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.