with RenderForm and HTML to Image?
Emit new event when a new render result is ready in RenderForm.
Generates an image using a supplied template. See the documentation
Retrieve a list of your personal templates, optionally filtered by name. See the documentation
Capture a screenshot from a URL. See the documentation
The RenderForm API empowers you to automate the conversion of HTML forms into static, embeddable forms. By integrating RenderForm with Pipedream, you can streamline the process of capturing responses and integrating them into your data pipeline. With Pipedream's serverless platform, you can create workflows that trigger on form submissions, pre-fill forms with data from external sources, and connect form data to other apps and services, such as CRMs, email marketing tools, or databases.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
renderform: {
type: "app",
app: "renderform",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://get.renderform.io/api/v2/my-templates`,
headers: {
"X-API-KEY": `${this.renderform.$auth.api_key}`,
"Content-Type": `application/json`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
html_to_image: {
type: "app",
app: "html_to_image",
}
},
async run({steps, $}) {
const data = {
"html_content" : "<div class=\"mt-4 p-4 text-center\"style=width:500px><span class=\"mb-4 tweet-text\">This is Little Bear. He tolerates baths because he knows how phenomenal his floof will appear afterwards. 13/10</span><div class=\"mt-2 p-4\"><img class=\"mt-4 border rounded-circle shadow\"src=https://docs.htmlcsstoimage.com/assets/images/dog.jpg width=100px></div><h4 class=mt-2>WeRateDogs</h4><span class=text-muted>@dog_rates</span></div><link href=https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css rel=stylesheet crossorigin=anonymous integrity=sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk><link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@700\"rel=stylesheet>",
"css_content" : ".tweet-text{background-color:#fff2ac;background-image:linear-gradient(to right,#ffe359 0,#fff2ac 100%);font-weight:bolder;font-size:32px;font-family:Roboto,sans-serif;padding:4px}",
"generate_img_url": true
}
return await axios($, {
method: "post",
url: `https://api.htmlcsstoimg.com/api/v1/generateImage`,
headers: {
"CLIENT-API-KEY": `${this.html_to_image.$auth.api_key}`,
},
data,
})
},
})