Emailens
GitHub Action

Inputs & Outputs

Complete reference for GitHub Action inputs and outputs.

Inputs

InputRequiredDefaultDescription
patternNoemails/**/*.htmlGlob pattern to find email HTML files
thresholdNo70Minimum compatibility score (0-100) per client
formatNohtmlInput format: html, jsx, mjml, or maizzle
api-keyNoAPI key for authenticated requests
clientsNoall clientsComma-separated list of client IDs to check
max-filesNo50Maximum number of files to check per run
fail-on-errorNotrueWhether to fail the action if critical errors are found

Outputs

OutputDescription
passed"true" if all files pass the threshold, "false" otherwise
summaryHuman-readable summary of results
resultsJSON array with per-file scores

Using outputs

- uses: emailens/action@v1
  id: email-check
  with:
    pattern: "emails/**/*.html"
    threshold: "70"

- name: Comment on PR
  if: steps.email-check.outputs.passed == 'false'
  uses: actions/github-script@v7
  with:
    script: |
      github.rest.issues.createComment({
        owner: context.repo.owner,
        repo: context.repo.repo,
        issue_number: context.issue.number,
        body: `Email compatibility check failed:\n\n${steps['email-check'].outputs.summary}`
      });

Available client IDs

gmail-web, gmail-android, gmail-ios, outlook-web, outlook-windows, outlook-windows-legacy, outlook-ios, outlook-android, apple-mail-macos, apple-mail-ios, yahoo-mail, samsung-mail, thunderbird, hey-mail, superhuman

On this page