# Base64 Encode transform action

## Use Case

You have a string value of a CSV file and you are looking to send it as an attachment using the `Send Mail As Impersonated User` action via the `Microsoft Graph` integration which requires the CSV string to be base64 encoded.

## Overview

Encode a string in base64.

### Parameters

<table><thead><tr><th width="217">Parameter</th><th width="417.3333333333333">Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>String</td><td>String to encode</td><td>true</td></tr><tr><td>URL Safe</td><td>Whether to return a URL-safe base64 format. '-' is used instead of '+', and '_' instead of '/'.</td><td>false</td></tr></tbody></table>

## Usage

<details>

<summary>Example 1: Encoding a String</summary>

Inputs:\
\*\*String\*\*: This @is my test string-yeeeehaw\
\*\*URL Safe\*\*: false

</details>

## Results output

Result of Example 1:

```
VGhpcyBAaXMgbXkgdGVzdCBzdHJpbmcteWVlZWVoYXc=
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rewst.help/documentation/automations/actions-in-rewst/transform-actions/base64-encode-transform-action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
