---
url: 'http://workflows-of-ai.com/blog/faq'
title: FAQ
author:
  name: 'Marcus Johansson'
  url: 'http://workflows-of-ai.com/about/marcus-johansson'
date: '2023-10-14T14:47:19+02:00'
updated: '2026-10-10T12:14:04+02:00'
type: article
summary: 'Turn a PDF into an FAQ in Drupal: ConvertAPI extracts the text and OpenAI writes questions and answers into an FAQ Field.'
tags:
  - 'Marcus Johansson'
  - Workflows
  - 'Drupal AI'
image: 'http://workflows-of-ai.com/sites/default/files/previews/d7cffc157b9fc0d2.jpg'
published: true
og:
  site_name: 'Workflows of AI'
  'image:width': '1280'
  'image:height': '720'
  'image:alt': FAQ
---
Drupal AI

# FAQ

Upload a PDF and get five questions and answers in an FAQ field, written by OpenAI from the text that ConvertAPI extracts.

  Marcus Johansson

October 14, 2023 · 2 min read

 ## About this video

The process begins with uploading a PDF to the AI Interpolator ConvertAPI module. This tool is responsible for converting the PDF into a readable text format. The ConvertAPI does its job, ensuring that the content from the PDF is accurately extracted and ready for the next phase of processing. There’s no complexity here; it's about getting the text out of the PDF as accurately and quickly as possible.

Next, the extracted text is processed by the AI Interpolator OpenAI module to create an FAQ section. OpenAI’s algorithms sift through the text, picking out key information and structuring it into a question-and-answer format. This formatted FAQ content is then directly populated into the [Drupal FAQ Field module](https://www.drupal.org/project/faqfield). The end result is a clear, concise FAQ section that's been automatically generated, eliminating the manual task of reading through the document and creating an FAQ manually.

*This video is from before the AI Interpolator module became AI Automators, part of the [AI module](https://www.drupal.org/project/ai). Module and menu names have changed since, and some steps look different today.*

## Watch the video

[Watch on YouTube: FAQ](https://www.youtube.com/watch?v=RRchTwZ3ijY)

### Video chapters

- 0:00 An FAQ from a PDF
- 0:41 The modules we use
- 1:49 Creating the PDF file field
- 3:00 Extracting text with ConvertAPI
- 3:37 The FAQ field and prompt
- 6:23 Uploading a PDF

## Transcript

YouTube's automatic captions, lightly corrected. Click a line to jump to that moment in the video.

### Transcript

- 0:01 hey there Marcus here again today I'm going to talk about uh a small chain where we basically take a PDF uh read the content from that PDF and from that PDF create a frequently Asked question
- 0:14 section uh and this this is actually very helpful if you're working with websites at least because creting frequently asked questions are usually very boring in the
- 0:23 beginning uh of course at a later stage where people actually start asking you question you can start answering the questions that they actually ask and it is pretty
- 0:34 useful uh but if you just want something initially AI can help with this and this is very helpful actually uh as always this is vanilla Drupal uh installed here that's what you
- 0:46 see uh as always the AI Interpolator modules are installed in this case we're going to use the ConvertAPI to convert the PDF to um to text and we're going to use the OpenAI to create the FAQ on top
- 1:01 of the interpolator and Drupal I also installed the module called FAQ fields which is a Drupal contrib module that creates a specific field that's very useful for FAQ where you have answering
- 1:13 question and answer um if you want to know more about how to install Drupal just look in the description uh to the video same with uh any if you need information on
- 1:26 how to install the AI Interpolator also so if you want some background info on it it's open source everything is free once you looked at the video you can set it up
- 1:36 yourself uh you can modify the code if you want if you find bugs in the code which there's probably plenty uh you can fix them for me which would nice or at least report them into the Drupal bug
- 1:48 tracking software um so let's get started we start with logging in and creating a content type uh so we're just going to call this a page in this case and of course the page should have
- 2:06 we're going to remove the body as always uh of course the page should have a body then but that's not what we really care about in this case we're just caring about this little small FAQ section that
- 2:17 we're going to have but we need a source to start with right so we need a file so a file field that's going to be our PDF file so that's the PDF file we upload just going to be
- 2:31 one uh and we require this because if we don't have the PDF file it's not going to work we say it should be a PDF file uh so with the ConvertAPI so you know you can take Word documents you can take
- 2:46 Excel uh files you can take CSV files uh and some other formats and convert that to text to uh do this workflow but in this case we're going to do PDF right so we save this
- 3:00 and the second field we need is a te text field so we can just take a text plane log uh because uh ConvertAPI just gives us plain text back so this is going to
- 3:13 be the PDF's text then and that's going to be one and this is the first chain we do then so we're going to use the text from document uh rule we're going to run it in base mode
- 3:27 and say we fetch from the PDF file right we can turn on batch just so we can see the progress and then we create another field which is the FAQ field uh and that we just called our
- 3:44 FAQ and that should have unlimited number of uh questions and answers or we could set it a specific number but let's say we keep it at unlimited and here then we enable the AI
- 3:57 interpolator and there is the OpenAI fa cube field we'll run it in base mode we're just going to do the PDF text as the um as the as the uh base field so we're getting the
- 4:15 in context from the PDF so we're going to write there based on the context write five questions and answers for the um for the I'm just going to turn on full HTML so we can actually add HTML
- 4:41 here so question and answers for the uh based on the context write five questions and answers for a FAQ section keep the answers under two sentences you may use HTML tags like
- 5:06 strong and EM uh strong can you do underline as well uh and then we just put the context here wait context take it copy it from the placeholder Advance setting once again
- 5:25 we're going to run it in batch mode and we have to have a higher interpolator weight because of course it needs to uh convert the PDF to text so the text is available before we try to create the
- 5:37 questions uh we could do GPT 4 to get better quality of selection of questions so writing the questions GPT 3.5 is as good as uh GPT 4 and faster but understanding what questions to actually
- 5:53 ask for gp4 is much better uh just to make make it Nic here I'm just going to remove some of these fields uh so you don't see them in the or no actually let's keep them so you
- 6:08 can see the process it might be interesting actually so if you ever set up a CMS of course you don't really care about the PDF's text right but let let's keep it here so we
- 6:23 call the stretches and we're just going to upload this PDF then right and that's it so now it's going to fill out PDF text first and then fill out FAQs and we're going to see a little
- 6:37 nice FAQ Graphics because that's what the FAQ module does this accordion uh accordion display basically where we can open and close different FAQs so first it got the text and now
- 6:54 it's hopefully trying to create uh some questions and answers so here you see the text from the PDF and if we go down there's FAQ with five questions and answers so what is antario pelvic
- 7:07 tilt that you can click on right see the different questions um and it's not harder than that so then you have a FAQ to start with without having to spend maybe an hour or two to write this
- 7:23 yourself uh thank you for watching

  Filed under [Workflows](/blog?category=6) [Drupal AI](/blog?category=2)

Parts of this content were produced by AI.

This site has not assessed whether a label is required for this content.

  How was AI used?The video and the introduction are Marcus's own, first published on workflows-of-ai.com. AI wrote the subtitle, the summary and the video chapters from the transcript, and corrected misheard names in YouTube's automatic captions.

   Marcus Johansson

Tinkers with AI and Drupal

 [About Marcus](/about/marcus-johansson)[Drupal.org profile](https://www.drupal.org/u/marcus_johansson)[Drupal AI](https://www.drupal.org/project/ai)

## The post in three sentences

A page content type gets a required PDF field, a plain text field filled by ConvertAPI and an FAQ Field filled by OpenAI. The prompt asks for five questions and answers with answers under two sentences, and a higher weight makes sure the text exists first. Uploading a PDF gives an accordion with five questions and answers.