Manage email templates

Version: 1.0.2
communication/email-templates
superface

List, create, update and get template content

List all templates

Result isn't paginated, amount of returned templates depenends on provider.

Id
Name

Get template content

Obtain template content

Id
Subject
Text Content
HTML Content

Create template

Creates new template

Name
Subject
Text Content
HTML Content
Id
Name

Update template

Updates template with specified id

Id
Name
Subject
Text Content
HTML Content
Id
Name

1. Install

npx @superfaceai/cli install communication/email-templates

2. Use in your code

const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the installed profile
  const profile = await sdk.getProfile('communication/email-templates');

  // Use the profile
  const result = await profile
    .getUseCase('ListTemplates')
    .perform();

  return result.unwrap();
}

run();

3. Add providers