Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a plug-in for resend.com #845

Open
atompie opened this issue Nov 11, 2023 · 8 comments
Open

Write a plug-in for resend.com #845

atompie opened this issue Nov 11, 2023 · 8 comments
Assignees

Comments

@atompie
Copy link
Collaborator

atompie commented Nov 11, 2023

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

@ryomahan
Copy link

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?

@atompie
Copy link
Collaborator Author

atompie commented Nov 23, 2023

@atompie
Copy link
Collaborator Author

atompie commented Nov 23, 2023

@ryomahan You could try this approach to ease the plugin development: https://youtu.be/R_kr9mBAKAU

@ryomahan
Copy link

ryomahan commented Dec 5, 2023

@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:

image

method two

make all params as a Json FormField

@atompie
Copy link
Collaborator Author

atompie commented Dec 5, 2023

What are these params? Maybe they will fit into the resource. Are the params connection related? Or rather define what data to send.

@ryomahan
Copy link

ryomahan commented Dec 5, 2023

@atompie like this:

image

@atompie
Copy link
Collaborator Author

atompie commented Dec 5, 2023

Ohh Ok then it goes into the form one by one. Like in the SMTP plugin.

@ryomahan
Copy link

ryomahan commented Dec 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants