0

I'm trying to move email/email templates from classic content into content builder using SOAP API.

I need to move all emails under specific folder (01_2018), however I'm receiving error

    <soap:Text xml:lang="en">WSE012: The input was not a valid SOAP message because the following information is missing: action.</soap:Text>

Below is a sample soap envelope for my request:

    <?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-32259181" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>Username</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RetrieveRequest>
            <ObjectType>Email</ObjectType>
            <Properties>ID</Properties>
            <Properties>Name</Properties>
            <Properties>Subject</Properties>
            <Filter xsi:type="SimpleFilterPart">
                <Property>Email.Folder</Property>
                <SimpleOperator>equals</SimpleOperator>
                <Value>01_2018</Value>
            </Filter>
         </RetrieveRequest>
      </RetrieveRequestMsg>
   </soapenv:Body>
</soapenv:Envelope>

I referenced from this article (Retrieve email object from folder via soap API).

2
  • 2
    There is a feature call "Import from Classic" when you go to Content Builder (at top right corner before the blue button) . Have you tried this feature yet? I haven't had a chance to try so not sure how it works.
    – Duc Le
    Commented Apr 13, 2023 at 2:27
  • That feature only import contents to content builder not emails.
    – ayedgolul
    Commented Apr 14, 2023 at 7:05

1 Answer 1

0

You need a Retrieve action under soapenv:Header , also I suggest to use one of SFMC SDKs for SOAP API calls, so you don't have to manually construct SOAP message

<soapenv:Header>
<wsa:Action>Retrieve</wsa:Action>
<wsse:Security ...

Update for folder reference

You can get CategoryID (folder.ID) reference when retrieving Email object

<ObjectType>Email</ObjectType>
<Properties>ID</Properties>
<Properties>Name</Properties>
<Properties>Subject</Properties>
<Properties>CategoryID</Properties>

Then you can find Folder details via retrieveRequest e.g. Folder.Name, Folder.ParentID gives you reference to the parent folder ID.

You cannot move classic folders or emails to Content Builder as Content Builder is REST API not SOAP. You can rebuild the folder structures in Content Builder via REST API, folder is called category in content builder, post to the endpoint to create a folder in Content Builder

2
  • Is there any way to after retrieving category id of folder to move the folder from classic content to content builder using SOAP API? @BoHu
    – ayedgolul
    Commented Apr 20, 2023 at 7:49
  • @celinerose yes there is, I've updated the answer to include CategoryID in SOAP message
    – Bo Hu
    Commented Apr 20, 2023 at 9:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .