The API for generating high-quality images from HTML/CSS. No yak shaving required.
Go to siteThe HTML/CSS to Image API lets you programmatically create images from HTML and CSS, which is perfect for generating custom graphics, charts, or even to convert web content for sharing on social media. On Pipedream, you can harness this API within a serverless workflow, triggering image generation from various events, managing the data flow, and integrating with countless other apps to create powerful automations.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
html_css_to_image: {
type: "app",
app: "html_css_to_image",
}
},
async run({steps, $}) {
const data = {
"url": `https://google.com`,
}
return await axios($, {
method: "post",
url: `https://hcti.io/v1/image`,
auth: {
username: `${this.html_css_to_image.$auth.user_id}`,
password: `${this.html_css_to_image.$auth.api_key}`,
},
data,
})
},
})
Generate Custom Invoices: Automate the creation of visually appealing invoices by triggering the HTML/CSS to Image API whenever a new order is received on an e-commerce platform like Shopify. Pipedream can capture new order events and then use the HTML/CSS to Image API to create a custom-styled invoice image that can be emailed to the customer or stored in cloud storage like Google Drive.
Social Media Content Creation: Whenever a new blog post is published in WordPress, use Pipedream to trigger an automated workflow that generates a promotional image with the HTML/CSS to Image API, including the title and a snippet. The image can then be posted automatically to social networks like Twitter or Facebook via their respective APIs, boosting engagement with visually consistent and branded content.
Dynamic Email Personalization: For email marketing campaigns managed with Mailchimp, you can create personalized images for each recipient based on user data. Trigger the HTML/CSS to Image API with Pipedream when a campaign is sent, passing in subscriber information to generate custom images. These images can make emails more engaging, with personalized charts, greetings, or offers, and can be included in the Mailchimp emails for a unique touch.
HTML/CSS to Image uses API keys for authentication. When you connect your HTML/CSS to Image account, Pipedream securely stores the keys so you can easily authenticate to HTML/CSS to Image APIs in both code and no-code steps.
The HCTI API uses HTTP Basic authentication using your user_id
ID and api_key
. Both of these are available from your dashboard.