Seamless import of email threads into Appfarm – best approach?

Hi:)

I have a client case I’d like input on.

The case is that the user has an email thread they want to import smoothly into an Appfarm app. We suggested downloading the email and uploading it as text or a file object to Appfarm, but that turned out to be too manual given the high number of emails.

Ideally, they want to forward the email thread to an archive email address and have the email text and attachments automatically stored and visible in Appfarm.

Are there recommended ways to solve this in Appfarm?

If not, are there any good third-party services that could handle this flow?

// Sigurd

Hi! This is a classic challenge. I’ve run your case through both Appfarm AI and Gemini to get a balanced view of the “native” vs. “integrated” approaches.

Here is the consensus on the best way to handle high-volume email imports without the manual headache.

1. The Recommended Architecture: The “Webhook Relay”

Both AI models agree: Don’t have Appfarm “pull” the emails. Instead, have a service “push” them to an Appfarm Service Endpoint.

  • How it works: You forward the email to a unique address provided by a 3rd party. That service parses the body/attachments and sends a clean JSON POST request to your Appfarm Service Endpoint.

  • Appfarm Setup: Create a Service Endpoint with a Process Action. Use “Create Object” to store the body and “Create File Object” (URL source) for the attachments.

2. Which Service to Use?

Here is a breakdown of the top contenders based on the AI feedback:

Service Best For… Why?
Mailgun Staying “In-House” Appfarm already uses Mailgun for outbound. You can use their Inbound Routes to POST directly to your app.
Make .com Ease of Use Their “Mailhook” is incredibly fast to set up and handles the “messy” parts of email formatting (stripping signatures, etc.) before it hits Appfarm.
CloudMailin Technical Precision Specialized in converting complex MIME emails into JSON. Very reliable for heavy attachment handling.
MS Graph API Enterprise/M365 Best if the client is strictly on Microsoft 365, but requires more complex OAuth setup and IT approvals.

3. Pro-Tips for Success

When building the Service Action in Appfarm, keep these “gotchas” in mind:

  • Payload Limits: Check your Environment Config > Service Security. If emails have large attachments (e.g., >1MB), you may need to increase the Max Payload Size, or the endpoint will reject the incoming mail.

  • Duplicate Threads: If a user forwards a whole thread, you’ll get the entire history. You might want to use a simple Regex in your Appfarm Action to “clip” the text at the first “From:” or “Sent:” line to keep the database clean.

  • Filtering Signatures: Use a service like Make or Parseur if you want to avoid saving 500 company logo icons (image001.png) as “attachments” in your File Objects.

Thank you:)

Using Mailgun and keeping it “in-house” would be great, but I don’t fully understand what you mean. Could you elaborate?

And is there no way to handle this in Appfarm without using third-party software?

Best,
Sigurd

Hi!

To clarify:

Appfarm does not have a built-in inbox for receiving emails. This means that if you want emails from your users to appear inside your solution, you will need to use a third-party service that can receive the email and forward it to an Appfarm Service Endpoint, where you can handle the business logic.

In practice, the email service receives the raw email, parses it, and converts the content (including metadata and attachments) into structured data, typically JSON, which is then sent to the Service Endpoint. This makes it much easier to process the email reliably inside Appfarm.

This is the only way to achieve a seamless, real-time setup.

An alternative approach is to configure a Scheduled Service that periodically fetches emails from your email server. However, this depends entirely on what your email provider supports (for example, this works with Gmail via its API). This approach is generally more technical to implement.

Appfarm uses Mailgun as the underlying service for sending platform emails. However, if you want to use additional features such as Inbound Routes (for handling incoming emails to your domain), you would need to set up and configure your own Mailgun account. This is also the recommended approach.

Malin

Thank you for clarifying:)