Prepare physical mail with a Gemini-powered agent

Build an agent that can prepare the letter and its delivery together. Gemini selects the tool; your application transfers the finished document to Postedly and returns the exact quote. The person using your app keeps the final say.

Documented API path · untested

Last tested
Not yet tested

Gemini supports function calling for external tools and APIs. This guide describes an application integration with Postedly; it does not claim a verified Gemini client or a built-in consumer app connection.

Client and environment
Custom Gemini API application with Postedly tool execution; documented integration design only.
Stages completed
No Postedly workflow stages verified in a Gemini application.
Your remaining steps
Implement OAuth and file transfer, test argument validation and quote handling, then present the proof and private approval link to the sender. Keep payment behind that review.
Still unverified
Application authentication, document transfer, quote/review, payment and fulfillment.

Use Google Gemini with Postedly

  1. Connect the sender through OAuth

    Implement Postedly’s public-client flow with an exact HTTPS callback, S256 PKCE and browser consent. Keep the connected owner’s credentials in your application’s secure runtime.

    Postedly connection and file-transfer guide
  2. Define and execute sending functions

    Expose narrow tools for available services, document upload, quotes and order status. Validate the model’s arguments and execute the corresponding Postedly requests in your application.

    Read the HTTP API schema
  3. Return the quote and review link

    Give the model structured results while presenting the final proof and total to the user. Keep checkout approval separate from document generation.

Give it a specific request

Turn an approved record into a mailed letter

Let your application assemble the final PDF and pass a private artifact reference to its sending tool.

Example request
Prepare a mailing quote for the approved welcome letter and address in this record. Use the final PDF, show me the proof and total, and wait before checkout.

Transfer your file

Your backend reads the real artifact and sends multipart bytes to /api/documents with the same owner’s OAuth token. Verify the returned checksum. An MCP-capable runtime can instead use the direct upload tool. Model-generated text, local paths and Gemini file references do not automatically transfer a document to Postedly.

  • For a letter or fax, prepare a valid, unencrypted PDF no larger than 10 MiB (10,485,760 bytes). Review the saved PDF after exporting it from the draft.
  • For mail, have the recipient’s full US postal address and your US sender address ready. For fax, confirm the receiving US fax number and your US billing address. Check the selected service’s page and layout limits before quoting.
  • Review the final proof returned with the quote, including any added cover or postal layout. An upload preview alone does not establish that the final document is ready to send.

Your approval comes before the send

Uploading and quoting never pay or send. After the user chooses to proceed, present Postedly’s browser review link and hosted Stripe Checkout. Function execution is not a substitute for order approval, and native Gemini payment is not claimed.

Cancellation and refund policy

Follow the existing order

Store the returned order ID and expose a read-only status function. Keep payment and fulfillment distinct, and reconcile the existing order before retrying an uncertain operation.

Check an order on Postedly

Send directly on Postedly

You can use the finished document without connecting an assistant. Download the approved PDF, open Postedly, choose an available service and upload the file. Enter the destination and sender details, then review the final proof and full price before payment. You do not need your own printer or envelopes to mail a PDF through Postedly.

Before you start

  • This is a custom integration for Gemini-powered applications, not a ready-made Gemini app or CLI connection. You own tool execution, credential storage and access controls. Postedly accepts files up to 10 MiB under the selected service’s rules; client-specific OAuth and file access still require testing.

Official references

Use these platform references alongside the Postedly guide.

Ready to prepare a send?

Use the connected assistant, or finish directly with Postedly.

Build with the API guide