# Automatically fill forms from incoming emails?

**URL:** <https://community.n8n.io/t/automatically-fill-forms-from-incoming-emails/150721>\
**Category:** Questions\
**Tags:** data-transformation, node, workflow-building, read-pdf, extract-from-file\
**Created:** [July 16, 2025, 2:38pm UTC](https://community.n8n.io/t/automatically-fill-forms-from-incoming-emails/150721 "2025-07-16T14:38:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nelly\_gig](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/nelly_gig/32/61108_2.png) [@Nelly\_gig](https://community.n8n.io/u/Nelly_gig)\
**Post date:** [July 16, 2025, 2:38pm UTC](https://community.n8n.io/t/automatically-fill-forms-from-incoming-emails/150721/1 "2025-07-16T14:38:59Z")

</div>

Hi everyone,

I’m trying to figure out if this kind of workflow is possible with n8n. We get a lot of emails from clients, we need to automatically extract that data and use it to fill out a PDF form we use regularly. Once the form is filled, it should be sent back by email. And ideally, We’d also want to send the extracted data into a SharePoint list.

Is this something that can be done with native n8n nodes, or would I need to use an external service for the form filling part?

Appreciate any tips or suggestions.

---

<div class="post-metadata">

**Author:** ![Erick\_Torres](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/erick_torres/32/66408_2.png) [@Erick\_Torres](https://community.n8n.io/u/Erick_Torres)\
**Post date:** [July 16, 2025, 3:06pm UTC](https://community.n8n.io/t/automatically-fill-forms-from-incoming-emails/150721/2 "2025-07-16T15:06:18Z")

</div>

Use the Email Trigger (IMAP) or Email Read (IMAP) node, configuring an IMAP connection and filters (such as the subject and inbox). This node triggers the flow when a relevant email arrives.

If the data is in the body: you can easily parse it with an HTML Extract node. If it’s in a PDF attachment: you can use the PDF Extract node, or for greater precision, connect an extraction service like Unstract. With it, you send the PDF to its API and receive JSON with the mapped fields.

n8n doesn’t include a native node to modify PDFs. You need to extract data (JSON). You make an HTTP request to the service that populates the PDF (input: template + JSON). You get the already populated PDF as a binary response.

Use n8n’s Send Email node, which allows you to send attachments (in this case, the PDF), even using the “Send and wait for response” option for approval if desired.

With an HTTP Request node configured with the SharePoint REST API, you can format the JSON as a list row and POST after extracting data.

Summary flow in n8n:

- IMAP Email Trigger → filters incoming emails.
- PDF Extract (or HTML Extract) → extracts data.
- HTTP Request to external service that populates the PDF.
- Send Email with PDF attachment.
- HTTP Request → records data in SharePoint.

---

<div class="post-metadata">

**Author:** ![EugeneS](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/eugenes/32/42671_2.png) [@EugeneS](https://community.n8n.io/u/EugeneS)\
**Post date:** [July 18, 2025, 9:06am UTC](https://community.n8n.io/t/automatically-fill-forms-from-incoming-emails/150721/3 "2025-07-18T09:06:32Z")

</div>

We’ve handled this kind of setup using instafill.ai alongside n8n. The email gets forwarded to a specific address, and [Instafill](https://instafill.ai) takes care of extracting the data, filling out the PDF, and emailing the completed form back. From there, we just use n8n to monitor the inbox and push the extracted values into SharePoint, no custom parsing.

---

<div class="post-metadata">

**Author:** ![Marian\_Danas](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/marian_danas/32/136766_2.png) [@Marian\_Danas](https://community.n8n.io/u/Marian_Danas)\
**Post date:** [November 11, 2025, 8:43pm UTC](https://community.n8n.io/t/automatically-fill-forms-from-incoming-emails/150721/5 "2025-11-11T20:43:05Z")

</div>

[PDF Generator API](https://n8n.io/integrations/pdf-generator-api/) node is built directly into n8n (you can find it in the nodes list) and has a dedicated action for this. **PDF Form Filling (Your Question):** This is where you’ll use the **PDF Generator API node**.

Select the **`Fill Form`** action. \> You’ll connect your PDF template (which you’ve uploaded to your PDF Generator API account). \> You can then easily map the data extracted from step 2 (e.g., `{{ $json.client_name }}`, `{{ $json.order_id }}`) directly to your PDF’s form fields. \> The node will output the completed PDF file’s binary data for the next step.

---

<div class="post-metadata">

**Author:** ![valerian](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/valerian/32/192643_2.png) [@valerian](https://community.n8n.io/u/valerian)\
**Post date:** [October 6, 2026, 6:45pm UTC](https://community.n8n.io/t/automatically-fill-forms-from-incoming-emails/150721/6 "2026-10-06T18:45:37Z")

</div>

This is doable, and it gets much easier to debug if you split it into three parts:

1. Extract: Email Trigger (IMAP) or the Gmail trigger, then pull the fields out. If the emails are free text, an AI step (the Information Extractor node, or an LLM chain with a structured output parser) is far more reliable than regex. Define exactly the fields your form needs and have it return only that JSON.
2. Fill: n8n has no native node that writes into PDF form fields, so this part is an HTTP Request to a form-filling service or a small script. If you self-host, a Code node with pdf-lib can set the form fields by name, but you need to allow external modules (`NODE_FUNCTION_ALLOW_EXTERNAL=pdf-lib`).
3. Deliver: send the binary from step 2 as an attachment with the Gmail or Send Email node, and from the same JSON create the SharePoint list item (Microsoft SharePoint node if your version has it, otherwise the Graph API through HTTP Request).

One tip: write the extracted JSON to the SharePoint list before you fill the PDF. When a form comes out wrong, you can then see right away whether extraction or filling was the problem.
