Get emails from multiple folders

I’ve been stalling for a while over the possibility of returning emails from several folders.
With a single folder, everything works correctly :exploding_head:

Thanks for your help

Screenshot 2024-07-23 at 17.32.30

Hi @princenocode can you share a code sample of how you are trying to retrieve emails from multiple folders?

I’m doing a simple request with Postman, everything works when I get on a single folder.

Hi, this field only supports a string, so only one folder.

From our developer docs:

You can retrieve from multiple folders, but this would be multiple API calls to the same endpoint with a different value for the in field.

Thanks @ram, but I have to foundan another solution unfortunately :pensive:

@princenocode let us know if we can help any further.

Just curious, is there a limitation for using two separate API calls to retrieve messages, what is the use case that you have in mind?

@ram , Users may have several folders (sometimes up to ten). This could multiply the number of calls during the first synchronization.
I’ll try to find another solution, otherwise I’ll go with this solution.

If you are using GMAIL, I think you can use search_query_native (as you can see here).

Google refine searches

2 Likes

Thanks a lot @ram,
I’ll try it :slight_smile:

You’re welcome, but… I’m not @ram, XD

1 Like

My bad @VictorMonteiro7 ,
Thanks for your help

2 Likes

Thanks for jumping in @VictorMonteiro7 :partying_face: Really appreciated! :clap:

3 Likes