> ## Documentation Index
> Fetch the complete documentation index at: https://help.nextmatter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create XML files and send them to Google Drive

> Next Matter allows you to create XML files automatically and place them in a Google Drive folder of your choice.

This scenario can be useful if you want to create multiple SEPA instructions.

## Before you begin

* You need to be familiar with the XML structure of the output file. A sample structure is [available here](https://www.hettwer-beratung.de/sepa-spezialwissen/sepa-technische-anforderungen/pain-format-sepa-pain-001-sct/).
* Make sure you have a Google Drive folder set up.
* Check the [required scopes](/docs/security-matrix) to learn more about which data is shared between the apps.
* Connect Google services in Next Matter with a service account and share data with this account. [Learn more...](/docs/integrate-with-google)
* We assume you have a workflow created in Next Matter,

## Generate the file

1. In your process, create a new integration step.
2. Click **Settings**, and enter the following details:

* **Method**: POST
* **URL**:

<CodeGroup>
  ```http HTTPS theme={null}
  https://n962q5mp7c.execute-api.eu-central-
  1.amazonaws.com/g/util/template_text_gdrive/PARENTIDOFGOOGLEDRIVEFOLDER/DATAREFERENCETOFILENAMEFORXML?
  amount=DATAREFERENCETOAMOUNT&bic=DATAREFERENCETOBIC&kunde=DATAREFERENCETOCUSTOMERNAME&iban=DATAREFERENCETOIBAN&usage=DATAREFERENCE
  TOVERWENDUNGSZWECK&_fileextension=xml
  ```
</CodeGroup>

<Tip>
  You can add multiple variables to the URL, separated with "?". They can to be inserted in the body in the format of \<%= VARIABLENAME %>
</Tip>

* **Headers**: Content-Type: text/xml
* **Authorization**: Google Drive
* **Body**: The body for a DATEV-readable-XML file for SEPA Bank transfers might look like the following:

<Accordion title="View XML example">
  <CodeGroup>
    ```xml XML theme={null}
    <?xml version="1.0" encoding="UTF-8"?> 

    <Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03 pain.001.001.03.xsd"> 
    <CstmrCdtTrfInitn> 
    <GrpHdr> 
    <MsgId><%= format(new Date(date), "yyMMddHHmm") %></MsgId> 
    <CreDtTm><%= format(new Date(date), "yyyy-MM-dd'T'HH:mm:ss.SSSxxx") %></CreDtTm> 
    <NbOfTxs>1</NbOfTxs> 
    <CtrlSum><%= amount %></CtrlSum> 
    <InitgPty> 
    <Nm>NAMEHARDCODE</Nm> 
    </InitgPty> 
    </GrpHdr> 
    <PmtInf>
    <PmtInfId><%= format(new Date(date), "yyMMddHHmm") %></PmtInfId>
    <PmtMtd>TRF</PmtMtd> 
    <NbOfTxs>1</NbOfTxs> 
    <CtrlSum><%= amount %></CtrlSum> 
    <PmtTpInf> 
    <SvcLvl> 
    <Cd>SEPA</Cd> 
    </SvcLvl> 
    </PmtTpInf> <ReqdExctnDt><%= format(new Date(date), "yyyy-MM-dd") %></ReqdExctnDt> 
    <Dbtr> 

    <Nm>NAMEHARDCODE</Nm>  
    </Dbtr>  
    <DbtrAcct>  
    <Id>  
    <IBAN>HARDCODESENDERIBAN</IBAN>  
    </Id>  
    </DbtrAcct>  
    <DbtrAgt>  
    <FinInstnId>  
    <BIC>HARDCODESENDERBIC</BIC>  
    </FinInstnId> \<  
    /DbtrAgt>  
    <ChrgBr>SLEV</ChrgBr>  
    <CdtTrfTxInf> <PmtId>  
    <EndToEndId>\<%= format(new Date(date), "yyMMddHHmm") %>-0000001</EndToEndId>  
    </PmtId>  
    <Amt>  
    <InstdAmt Ccy="EUR">\<%= amount %></InstdAmt>  
    </Amt> <CdtrAgt>  
    <FinInstnId>  
    <BIC>HARDCODESENDERBIC</BIC>  
    </FinInstnId>  
    </CdtrAgt>  
    <Cdtr>  
    <Nm>\<%= kunde %></Nm>  
    </Cdtr>  
    <CdtrAcct>  
    <Id>  
    <IBAN>\<%= iban %></IBAN> 

    </Id> 

    </CdtrAcct> 
    <RmtInf> 
    <Ustrd><%= usage %></Ustrd> 
    </RmtInf> 
    </CdtTrfTxInf> 
    </PmtInf> 
    </CstmrCdtTrfInitn> 
    </Document>
    ```
  </CodeGroup>
</Accordion>
