In the Emailify export panel, select the Custom Webhook URL option from the dropdown list, then paste in your own custom URL endpoint that has been created to handle the JSON payload sent from Emailify.
When you're ready, click the POST button to start exporting the emails you've selected from Figma to HTML, and have them automatically sent as a POST
request to your custom webhook endpoint.
The JSON payload object sent via POST to your URL โ
The JSON payload sent from Emailify contains the object keys/values below; you'll need to ensure that your custom webhook URL has been created to handle this payload, which you can then use however you like.
{
"name": "Name of the Figma frame",
"subject": "Subject line set in Emailify settings",
"preheader": "Preheader text set in Emailify settings",
"html": "<html><head></head><body>Exported email HTML</body></html>"
}
POST your JSON payload via a proxy server โ
As Figma plugins are run inside of a sandboxed iFrame
element in the Figma app, it doesn't have any origin
, so your Webhook URL that you POST
the JSON payload to may reject the request due to cross-origin CORS issues.
To work around this, you can either update your own Webhook function with Access-Control-Allow-Origin set to *
(all), or you can enable the Use Proxy toggle (which is turned on by default) in the Emailify plugin settings when you're exporting your email to a custom Webhook.
Enabling the Use Proxy toggle with autoamtically route your request through a proxy server before hitting your Webhook URL, to ensure that the incoming POST request has an origin
and should resolve any CORS issues. This is purely a forwarding request, so the JSON data will flow directly through the proxy, and forwarded on straight to your own Webhook URL.
Upload image assets to your own cloud storage bucket โ
By default, when you use the Custom Webhook URL
export option, Emailify will use the Emailify CDN (content delivery network) to host your images for you, but you can optionally swap this out to use your own AWS S3 or Backblaze B2 bucket instead.
Once you select the image hosting service you'd like to use, you'll need to enter your bucket credentials and details below, which will automatically upload your image assets to your own bucket (and use your bucket image path in the src
attrbutes of your HTML <img>
tags) during the export process:
- Access Key
- Secret Access Key
- Bucket Name
- Bucket URL