Possible to search in pdf then send

Hi
I have a large pdf file that each page has a unique ID number. and I want the bot to send each page to some customers. each customer knows his ID. Is it possible that whenever a customer sends his invoice number, the bot searches in the pdf that I have and send him his?
many thanks

Hi @fnotaibi5,

Yes, it’s possible to create a Pipedream workflow to achieve this. You’ll need to use a trigger to receive the customer’s invoice number, then use a code step to process the PDF file, extract the pages based on the unique ID, and send the corresponding page to the customer.

Here’s a high-level outline of the steps you’ll need to follow:

  1. Set up a trigger to receive the customer’s invoice number. This could be an HTTP trigger if you want to receive the invoice number via an API call, or a trigger for a specific messaging platform like Slack or Telegram.

  2. Use a code step to read the PDF file and extract the pages based on the unique ID numbers. You can use a package like pdf-lib to achieve this. You’ll need to import the package in your code step:

import { PDFDocument } from "pdf-lib";
  1. Once you’ve extracted the relevant page, you can send it to the customer using an action or a code step that integrates with your preferred messaging platform or email service.

Please note that you’ll need to store the PDF file in a location accessible by your Pipedream workflow, such as an S3 bucket or another cloud storage service. You can then use the appropriate SDK or API to read the file in your code step.

If you need more help with specific steps or code, please provide more details about your use case, such as the messaging platform you’re using and the structure of the PDF file.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.

Thank you.
The messaging platform that will be used is Telegram, The structure of the PDF file simply provide the name of the customer, his ID, and fixed columns for the purchase details. Each customer has 1 page so the PDF file is 271 pages, which means 271 customers. Also, if I can upload the PDF file to OneDrive as cloud storage? In addition, is it possible to help me step by step, please? I am not familiar with coding.
Thank you

What is the size of the pdf? Does it keeps on changing? I meant how frequently it get’s updated?

Its 5mb and I change it every 3 months

@fotodino,

I think this need a sufficient coding knowledge to implement. If you’re still unsure that you can implement your usecase, you can:

  1. Read more about Pipedream Node.js document here
  2. Read more about Javascript, especially Node.js part. Also you can watch through Pipedream speedrun series to have more references
  3. If you’d like to hire a Pipedream expert for your usecase, feel free to use this link: Connect with a Pipedream Partner

There a few ways this can be done but it would require you to have some coding knowledge for sure.