✅ What you’ll learn in this module:

  • How to deploy your connector using Google Cloud Functions
  • How to configure environment variables (like your Weld token)
  • How to get the public endpoint URL to use in Weld


🌐 Why Google Cloud?

Weld needs to access your connector from the internet. The easiest way to do that securely is with Google Cloud Functions, which lets you deploy lightweight Python APIs with minimal setup.



🛠 Step-by-step: Deploy to Google Cloud

1. Go to Google Cloud Console

Make sure you have:

  • A Google Cloud project set up
  • Billing enabled
  • The Cloud Functions API enabled

2. Click “Create Function”

  • Name: weld-custom-connector
  • Region: Choose one close to your data
  • Trigger: HTTP → Set to Allow unauthenticated invocations (authentication is handled inside your code)

3. Configure runtime

  • Runtime: Python 3.10 or higher
  • Entry point: handler

4. Add environment variables

Go to the Environment Variables section and add:

1ini
2CopyEdit
3WELD_AUTH_TOKEN = your-secret-token

(Make sure this matches the token you'll use in Weld)

5. Upload your code

Choose Inline editor, then paste in your main.py code.

Create a file called requirements.txt and add:

1pgsql
2CopyEdit
3functions-framework
4requests
5python-dotenv

6. Click Deploy

It may take a minute or two to complete.



🔗 Copy your endpoint URL

Once deployed, you’ll see your function’s public URL. Copy it — this is what you’ll enter in Weld as the connector endpoint.



🧪 Test it from Postman (again)

Send a request to your public function URL with the correct header:

1Authorization: Bearer your-secret-token

✅ If it returns data, you’re ready to connect it to Weld!

Next up

Connecting your custom connector in Weld

Plug your self-hosted API into Weld and start syncing data.

Go to module