Skip to content

feat: extend connector_decorator - #370

Merged
hallvictoria merged 6 commits into
devfrom
hallvictoria/connecor-decorator
Oct 15, 2026
Merged

hallvictoria merged 6 commits into
devfrom
hallvictoria/connecor-decorator

Conversation

@hallvictoria

@hallvictoria hallvictoria commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Extend connector_trigger with explicit configuration for Poll and Webhook delivery modes. Adds skill file for adding a new decorator. Fixes https://github.com/Azure/azure-functions-bucees-planning/issues/1324

New arguments:

Argument Description
delivery_mode DeliveryMode.POLL or DeliveryMode.WEBHOOK; also accepts case-insensitive strings. Defaults to Webhook in the host when omitted.
connection Connector connection setting. Required for Poll.
trigger_config_name Trigger configuration name, including app-setting expressions. Required for Poll.
cardinality Cardinality.ONE or Cardinality.MANY; also accepts case-insensitive strings. Optional; controls batching.
max_batch_size Maximum events per batch. Optional for Poll.
max_concurrent_calls Maximum concurrent calls. Optional for Poll.
target_pending_event_threshold Optional pending-event threshold used for scaling.

Example:

@app.connector_trigger(
    arg_name="payload",
    delivery_mode=func.DeliveryMode.POLL,
    connection="ConnectorNamespace",
    trigger_config_name="%OnNewEmailTriggerConfigName%",
    cardinality=func.Cardinality.ONE,
    max_batch_size=1,
    max_concurrent_calls=1,
    target_pending_event_threshold=16,
)
def on_new_email(payload: str):
    logging.info("Received connector event: %s", payload)

Validation:
For Poll, the binding checks that connection and trigger_config_name, are not None, raising a ValueError listing missing arguments. Webhook and omitted delivery mode do not require these fields.

Comment thread azure/functions/decorators/connectors.py Outdated
Comment thread azure/functions/decorators/function_app.py

@manvkaur Manvir Kaur (manvkaur) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread azure/functions/connectors.py Outdated
@hallvictoria
hallvictoria merged commit 22d0118 into dev Oct 15, 2026
16 checks passed
@hallvictoria
hallvictoria deleted the hallvictoria/connecor-decorator branch October 15, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants