How to save images in a Gente N8N on WhatsApp?

When opening a ticket (in a given system), the user can take one or more photos of the problem.

What the agent should do:

  • If the person writes about the problem, the agent should first ask if they want to attach a photo to the ticket. If they want to, they take the photo, and the agent attaches it to the ticket.

  • The person takes a photo of a problem, for example: a burnt-out lightbulb, and the agent analyzes the photo and asks if they want to open a ticket. If they say yes, the agent opens the ticket and attaches the photo.

Difficulties I’m considering:

  • How to save this photo in the Supabase database?

  • If they take the photo, the agent responds, and they tell them to open a ticket - in this flow, there have already been three executions in n8n, meaning the photo from the first execution is no longer available.

How can I solve this problem?

Iformation on your n8n setup

  • n8n version: 1.121.3
  • Database (default: SQLite): Supabase
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: Windows

You need to save the WhatsApp image immediately when it arrives, before any agent response happens. Download the media file using WhatsApp node, convert it to base64 or upload to storage, then store the reference in Supabase right away.

For multi-turn conversations, pass the image URL or ID through your agent memory or session state. Store it in a conversation context table in Supabase tied to the user phone number. When they confirm ticket creation later, retrieve that stored image reference and attach it.

Dont wait multiple executions to save media—grab and store it on first receive, then reference it later.

1 Like