import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
documentero: {
type: "app",
app: "documentero",
}
},
async run({steps, $}) {
const data = {
"document": `${this.documentero.$auth.document_template_id}`,
"data": {
// Replace with your template field mappings
firstName: "<your_first_name>",
lastName: "<your_last_name>",
company: "<your_company>",
// Add more fields as needed
},
//Add optional settings
format: "docx",
}
return await axios($, {
method: "post",
url: `https://app.documentero.com/api`,
headers: {
"authorization": `apiKey ${this.documentero.$auth.api_key}`,
},
data,
})
},
})
Documentero uses API keys for authentication. When you connect your Documentero account, Pipedream securely stores the keys so you can easily authenticate to Documentero APIs in both code and no-code steps.