I need help, stupid question probably.. n00b

I need some help Telegram auto AI · GitHub

Workflow is pretty basic:

Trigger if email

Send the email to AI for Summary

I receive the summary in Telegram with 3 options : Want to answer? Yes / No / Delete

Trigger when click a button…

I have problems with the Yes… I send the prompt to the AI but the AI completely forgot the email and i cant connect it because there are different workflows..

is a pain in the ass

can someone help? i only have 2 days in 8n8 i think this should be easy to solve

hi @ADAM8

two things:

  1. Only one telegram trigger is allowed per bot. You can’t use two of them
  2. Use a Data table to keep the metadata information between telegram triggers (e.g. store the message id, original email, and other valuable data there, so you can reuse it again on the callback query)

Thanks, the Data Table keeps the data updated or is static?

updated @ADAM8

Data tables | n8n Docs

@ADAM8 Data Tables are dynamic - they persist across executions and you can read/write to them from any workflow, so perfect for this use case. The simplest approach: when your email trigger fires, write the email content and a unique ID to a Data Table row. In the Telegram buttons, include that ID in the callback_data. When the user taps “Yes”, your second workflow receives the ID via the Telegram callback, looks up the row in the Data Table to get the email content, then sends it to the AI. No static data - it updates every time a new email comes in.