On this page you can find some concrete use cases examples how you can use PIPEFORCE AI to boost your process automation and integration tasks ready for copy & paste.
Prompts
UC1 - Reductive Prompt: Create a summary from an email attachment
Use Case: Given is an email with attachment as input. Create a summary from this email loaded from an IMAP inbox.
pipeline: - imap.get: host: outlook.office365.com secret: my-office365-secret - ai.prompt.send: "Create a short summary of the attachment in the given email."
Result:
The attachment is an invoice from ABC Software (Germany) GmbH to Musterkunde AG, detailing various services provided and their associated costs for the period from 01.02.2024 to 29.02.2024. The invoice includes information on user accounts, transaction fees, VAT, and payment instructions.
UC2 - Classifying Prompt: Classify the type of an email attachment
Use Case: Given is an email with attachment as input. Classify the attachment of this email based on a given set of classes.
pipeline: - imap.get: host: outlook.office365.com secret: my-office365-secret - ai.prompt.send: | Given are these categories: invoice, quote, termination. In which of these fits the given attachment? Return only the name from the list.
Result:
invoice
UC3 - Classifying Prompt: Classify the the mood of the sender of an email
Use Case: Given is an email as input. Based on a list of moods, classify the mood of the email’s sender.
pipeline: - imap.get: host: outlook.office365.com secret: my-office365-secret - ai.prompt.send: | In which mood fits the given email? Return only the one from this list which matches best: happy, neutral, disappointed, angry, cannot detect
Result:
happy
UC4 - Transformative Prompt: Extract information from an PDF as JSON
Use Case: Given is an invoice as attachment PDF to an email. The goal is to extract all required information from this PDF and provide it in a valid JSON format.
pipeline: - imap.get: host: outlook.office365.com secret: my-office365-secret - ai.prompt.send: | Extract the invoice in the attachment to a JSON using this structure: { "invoiceNumber": "value", "address": "value", "invoiceDate": "value", "positions": [ { "description": "value", "pieces": "value", "price": value } ] }
Result:
{ "invoiceNumber": "123100401", "address": "ABC Provider (Germany) GmbH - Weg 3 - 12345 Stadt", "invoiceDate": "01.02.2025 - 29.02.2025", "positions": [ { "description": "Invoice WMACCESS Internet, 1 Month", "pieces": 1, "price": 130.00 }, { "description": "Router Type 3 rental", "pieces": 1, "price": 5.00 } ] }
Intents
UC5 - Detect the intent and its parameters from an user email
Use Case: Given is an email with an attachment. Based on a given set of intents, the AI should detect the one which matches and additionally extract all required information from it.
pipeline: # Read email from inbox - imap.get: host: outlook.office365.com secret: my-office365-secret # Detect the intent in the email - ai.intent.detect: advice: intentCandidates: - intentId: "invoice" prompt: "Use this intent in case the attachment is an invoice." params: supplierAddress: prompt: "Extract the supplier address from the invoice." invoiceNumber: prompt: "Extract the invoice number from the invoice." totalAmount: prompt: "Extract the total amount of the invoice in cents without any currency chars, separators or other special characters." - intentId: "termination" prompt: "Use this intent in case the attachment is a termination of a contract." params: contractNumber: prompt: "Extract the contract number." customerNumber: prompt: "Extract the customer number." reason: prompt: "Summarize in one sentence the reason for the termination." - intentId: "documentation" prompt: "Use this intent in case the attachment is a documentation." params: summary: prompt: "Create a short summary what this documentation is about."
Result:
{ "params": { "supplierAddress": { "name": "supplierAddress", "value": "ABC Software (Germany) GmbH - Im Weg 3 - 12345 Worth", "required": false, "pass": true, "type": "string" }, "invoiceNumber": { "name": "invoiceNumber", "value": "123100401", "required": false, "pass": true, "type": "string" }, "totalAmount": { "name": "totalAmount", "value": "45353", "required": false, "pass": true, "type": "string" } }, "enabled": true, "intentId": "invoice", "command": null }
UC6 - Detect and start a command / workflow based on a user email
Use Case: Given is an email with attachments. The AI must detect the intent of this email and finally a command linked to this intent must be executed and all required parameters must be extracted from the input email and transformed and passed along to the command. Also the attachment file must be passed along.
vars: containerProp: "global/app/io.pipeforce.test/data/container-${@text.random(10)}" pipeline: # Read the email from inbox - imap.get: host: outlook.office365.com secret: office365-testlab-secret2 subjectContains: test123 # Create the container property for the attachment - property.schema.put: path: ${vars.containerProp} input: "" output: false # Save the attachment to the container property - property.attachment.put: path: ${vars.containerProp} content: ${body[0].attachments[0]} output: ${vars.attachment} # Detect the command - ai.intent.detect: runDetectedCommand: true advice: intentCandidates: - intentId: "startInvoiceWorkflow" command: workflow.start prompt: "Sender has submitted a payable invoice." params: invoiceNumber: prompt: "Extract the invoice number." pass: false key: value: io.pipeforce.test_invoice-wf variables: value: "totalAmount": "{{intent.params.invoiceNumber}}" "invoice": ${vars.attachment} - intentId: "startTerminationWorkflow" command: workflow.start prompt: "Sender has submitted a contract termination." params: contractNumber: prompt: "Extract the contract number." pass: false key: value: io.pipeforce.test_termination-wf variables: value: "contractNumber": "{{intent.params.contractNumber}}" "terminationLetter": ${vars.attachment}
Result:
For an invoice given in attachments of the email, this will select a the startInvoiceWorkflow
intent with final workflow parameters as as listed below:
{ "params": { "invoiceNumber": { "name": "invoiceNumber", "value": "45353", "required": false, "pass": false, "type": "string" }, "key": { "name": "key", "value": "io.pipeforce.invoicetest_invoice-wf", "required": false, "pass": true, "type": "string" }, "variables": { "name": "variables", "value": { "firstName": "Max", "lastName": "Mustermann", "invoiceNumber": "45353", "invoice": "${vars.attachment}" }, "required": false, "pass": true, "type": "string" } }, "enabled": true, "intentId": "startInvoiceWorkflow", "command": "workflow.start" }
This JSON will then cause the command ai.intent.detect
to auto-execute the command workflow.start and pass along all parameters marked "pass": true
.
Add Comment