This topic was automatically generated from Slack. You can find the original thread here.
Hi! I was trying to use the Postmark integration to send emails, but there seems to be an issue with authentication. I can easily send an email using a nodejs code action such as this one:
import axios from "axios";
export default defineComponent({
async run({ steps, $ }) {
const data = {
From: '<redacted>',
To: '<redacted>',
TemplateAlias: 'template-1',
TemplateModel: {
var: 'var_Value'
}
};
const config = {
method: 'post',
url: 'https://api.postmarkapp.com/email/withTemplate',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'X-Postmark-Server-Token': '<redacted>'
},
data: data
};
try {
const response = await axios(config);
console.log(JSON.stringify(response.data));
return response.data;
} catch (error) {
console.error(error);
throw error;
}
},
});
Using the Postmark integration will simply return that a valid server token is missing (tested using the same one with code and with integration, so my token was OK).