Skip to main content
Question

Querying for recent emails sent/received in cards


alvin-tham
Forum|alt.badge.img

I am looking to search for all emails recently sent to or from a card.

The inbox_emails query can be used to display the details of an email, but doesn’t allow me to search for an email.

The closest thing I could find was to use the allCards query and filter by the “updated_at” field, but this pertains to the card itself and receiving an email doesn’t update this field.

 

{
  allCards(
    pipeId: 111
    filter: {field: "updated_at", operator: gte, value: "2024-02-01T00:00:00Z"}
  ) {
    edges {
      node {
        inbox_emails {
          id
          subject
        }
      }
    }
  }
}

 

Is there a query or field that would allow me to find recently sent or received emails?
 

2 replies

Terry Freitas
Pipefy Staff

Hi Alvin,

How are you? 

 

Believe this could assist you: 

query{
  allCards(pipeId:xxxxxxxx){
    edges{
      node{
        id
        comments{
          text
          created_at
          author {
            id
            name
            email
          }
        }
        inbox_emails{
          from
          main_to
          to
          subject
          body
        }
      }
    }
  }
}

 

If you need any assistance, just let us know. 


alvin-tham
Forum|alt.badge.img
  • Author
  • New Member
  • 1 reply
  • March 4, 2024

While that would retrieve all of the emails and cards, it could return a large of emails that I have no interest in and would need to filter out afterwards.

Is there any way to filter out the emails in the query itself?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings