Converger logic via webhook and timing

I want to combine communication with my clients and team into one output (eg. Clickup task).
The communication comes from either Gmail, or are added into a Google Sheet as a single row with information about the sender and the content.
In both cases, a task on Clickup is identified and I’m adding the messages to the task as comments (every call to to “add comment” adds a comment to the task in the order they are executed).

In order to achieve that I have 3 scenarios:

  1. A webhook that gets the info and posts a comment to the task.
  2. An email watcher that goes off every 6 minutes and sends the info to #1.
  3. A new row watcher that goes off every 6 minutes and sends the info to #1.

Problem is - The order that the webhook will receive the message is not the real order that they arrived due to them not being immediate.
Also, the pending webhooks calls might not always contain ALL the messages that really arrived in the last 6 minutes, because #2 and #3 won’t always trigger at the same time (one might trigger now, and one 3 minutes later, and then the info will get messed up).

How do I solve this?

Hello,

both gmail and sheets can be made to send instant hooks on new entries.

For Gmail → go to the gmail account → settings → show all settings → Forwarding and POP/IMAP → add a forwarding address and post your Make Custom Mailhook module address there.

Google sheets will need some custom code. Go to the sheet → extensions → app scripts and you can add a script there to call a Make Custom Webhook address when a new row is added.

2 Likes

Thank you, but these wouldn’t solve:

  1. Outgoing emails on Gmail.
  2. Changes made to the Google sheets using an API (which is what’s happening right now).

Any other solution?