Start a Dify workflow when an inbound iMessage, RCS, or SMS arrives through Linq.
Connect Dify agents and workflows to iMessage, RCS, and SMS through the Linq Partner API.
The integration has two installable plugins: Linq (outbound tools) and Linq Trigger
(signed inbound messages). Dify requires Tool and Trigger plugins to be separate packages.
Both are built from one source tree, with shared API code.
is a comma-separated list of 1–31 E.164 phone numbers or email addresses.
must be a Linq line in E.164 format. Do not combine with either field.
An explicitly selected sender uses Linq's create-chat endpoint: its first message cannot contain
a link. The automatic sender endpoint supports a link in the first message. Respect Linq's
channel, account, opt-out, and messaging restrictions. Typing is intended for direct chats.
Send returns accepted, not delivered. Check later message state with List messages;
this version does not expose delivery-status triggers.
Supply a unique, stable for each logical message. Repeat that same key only
when retrying the same message. For replies, use the inbound trigger's .
For multiple replies to one incoming message, append a stable suffix (, , etc.).
For outbound campaigns or scheduled workflows, derive the key from a durable job/event ID.
Do not generate a different random key on every workflow retry.
The client retries transient failures twice (including HTTP 409/error 2009 while a chat is
being created) with the same request body and key, uses a 10-second
timeout per HTTP operation, and respects Retry-After up to five seconds. Longer waits return an
error so the workflow can retry later. Error messages do not expose response bodies, credentials,
or message content. A successful HTTP response without the required send identifiers is treated
as an unknown result, not acceptance; retry it with the same key. Changing the API host,
following redirects, and disabling TLS verification
are not supported.
Install and create a Workflow with the Linq → Message received trigger.
Create a subscription using a Linq API key. Optionally enter comma-separated Linq line numbers
to restrict it. Empty means every line accessible to this key.
Dify creates a Linq subscription and stores the returned signing secret.
Its callback URL includes to request the correct Linq payload.
Connect the trigger to an LLM node. Pass as the incoming message. Set an appropriate
system prompt for your assistant. Media-only messages have empty ; branch on empty text
rather than sending it blindly to the LLM. contains the original parts, but this plugin
does not download media.
Connect the LLM to Linq → Send message, mapping:
Test with a dedicated Linq test line and a recipient who agreed to receive test messages.
Publish the workflow after verifying one inbound message produces one intended reply.
Trigger outputs: , , , , , , ,
, , , and . Group messages retain their chat ID;
an automated reply goes to that group. Add a condition on if replies should be DM-only.
The trigger validates the raw request's Standard Webhooks HMAC and rejects timestamps more than
five minutes in the past or future. It ignores outbound/self-sent, reconciled, and zero-retention
messages. Unsupported old message payloads fail with an instruction to select the correct version.
Removing an automatically created Dify subscription deletes its Linq webhook subscription.
For manual setup, create the Linq webhook yourself targeting Dify's endpoint with
(or if a query already exists), subscribe only to
, and enter its signing secret in Dify. Manually created subscriptions
must be removed in Linq yourself. If automatic creation times out, check Linq for a created
subscription before retrying: create calls are not retried automatically to avoid orphan duplicates.
See PRIVACY.md for the data flow and privacy responsibilities.
For Dify remote debugging, configure the environment variables provided by Dify's plugin debugger
(, , , )
locally, then run . Never commit credentials or debugger keys.
Build both packages with the Dify CLI.
Use a new output directory on each build (the command does not overwrite existing artifacts):
The build stages only each plugin's runtime files, adds its own manifest, and packages each
independently. The root source tree is not itself an installable plugin. Manifests live in
; shared client code is copied into both artifacts by the build script.
Tests use synthetic data and mocked API responses; they do not send real messages. See
VALIDATION.md for what has and has not been verified for this release.
Source and support: linq-team/linq-dify.
API contract: Linq Partner API.
Implementation reference: Linq Convex component.
Licensed under Apache-2.0. Linq logo sourced from Linq's website repository.
Last checked 11/09/2026 02:08 AM · version 0.1.0