Open topic with navigation

# Insert Documents into Google Drive

The connector's `insert` fetch action inserts files into Google Drive. To use the `insert` action, you must construct some XML that specifies how to insert each file. Add the XML to the action as the value of the `insertXML` action parameter.

The XML contained in the `insertXML` parameter must be URL encoded before being used in the action command. For example:

    http://host:port/action=Fetch&FetchAction=Insert
                                 &ConfigSection=MyTask
                                 &InsertXML=[URL encoded XML]

The XML that you provide to the connector can include the following property for each file:

`target_path` | The path in Google Drive in which you want to insert the source file. If you do not provide this property, the source file is inserted into the root directory of your Google Drive with a random file name.

For example, to insert a file by providing the path to the source file:

    <InsertXML>
      <insert>
        <reference>MyReference</reference>
        <section>MySection</section>
        <property name="target_path" value="insert/into/here.txt"/>
        <file>
          <type>file</type>
          <content>C:/My/Source/filename.txt</content>
        </file>
      </insert>
    </InsertXML>

Alternatively, to provide the content of the file base-64 encoded:

    <InsertXML>
      <insert>
        <reference>MyReference</reference>
        <section>MySection</section>
        <property name="target_path" value="insert/into/here.txt"/>
        <file>
          <type>content</type>
          <content>[base 64 encoded content]</content>
        </file>
      </insert>
    </InsertXML>

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm