tracardi
tracardi copied to clipboard
Write a plug-in for resend.com
Is your feature request related to a problem? Please describe. Resends some common maintenance when sending an email like deliver monitoring, etc.
Describe the solution you'd like Integrate resent with Tracardi as a plug-in
Please use their API not Python library as it is not async.
https://resend.com/docs/api-reference/introduction
Us our async client:
timeout = aiohttp.ClientTimeout(total=15)
async with HttpClient(retries,
[200, 201, 202, 203],
timeout=timeout) as client:
async with client.post(
url=f'someurl',
headers={"Authorization": f"ApiKey {self.credentials.token}",
"Content Type": "application/json"},
ssl=False,
json=params
) as response:
return response
We need the following plugin.
- Send email
- Batch email send
- Did email bounced
- Unsubscribe (if possible)
Please makes sure that you create a resource for Resend API
I read all the issue describe, there is one question:
What does Unsubscirbe do? What does it do in the API list of resend.com? Delete audience or contact?
@atompie can you help me understand this?
@ryomahan Delete contact: https://resend.com/docs/api-reference/contacts/delete-contact
@ryomahan You could try this approach to ease the plugin development: https://youtu.be/R_kr9mBAKAU
@atompie Hi, I start create plugin for this issue, and there is a new question:
how should I define Resend's API params?
method one
make every params as a FormField like:
method two
make all params as a Json FormField
What are these params? Maybe they will fit into the resource. Are the params connection related? Or rather define what data to send.
@atompie like this:
Ohh Ok then it goes into the form one by one. Like in the SMTP plugin.
Ohh Ok then it goes into the form one by one. Like in the SMTP plugin.
Luckly, I do like this, I'll push a alpha(just finish the send function) version PR tonight.