Native Zapier integration

Table of Contents

Native Zapier integration

General

TimelinesAI Zapier integration allows to synchronize your WhatsApp communication with external systems (such as CRMs) and to automate messaging as a part of your business flows.

With TimelinesAI, you can connect and dynamically select WhatsApp account to be used for receiving and sending text messages and file attachments, messaging in groups and much more.


Before you start, please make sure that you are well acquainted with Zapier automation concepts: https://platform.zapier.com/quickstart/introduction


Few things to keep in mind:

  • Actions that involve sending messages and attachments utilize TimelinesAI Message Sending quota (each message = 1 quota unit).
  • We use Whatsapp Web API to deliver messages. In some cases, a message might not be delivered to a recipient due to technical reasons related to WhatsApp Web platform. When such delivery failure is detected, we will restore your Message Sending quota.
  • Events and actions other than sending messages don’t utilize Message Sending quota but they still are subject to a fair usage limit of 100,000 API calls per month. For extending this limit, please contact us for business plan quotation.
  • Each event activation uses Zapier tasks, therefore use “New message” events with care: large volume of WhatsApp communication can exhaust tasks credit in your Zapier account.
  • In order to send file as an attachment, you need to make it available as a publicly accessible and downloadable URL, that can be supplied in an appropriate action. You can use Google Drive or similar file hosting platform to upload a file and obtain its public URL for further use.
  • When receiving a message with attachment, the later will be available for download by means of a publicly accessible and downloadable URL, that will remain valid for 15 minutes from the moment the event was triggered. Don’t store this URL for a longer period of time, as it will expire.
  • When testing an event, most recent message in your workspace will be loaded (either outgoing or incoming message, belonging to any account).

Setup and authentication

In order to connect Zapier with TimelinesAI, navigate to Zapier Integration page in your TimelinesAI workspace and generate new token (“Generate new token”). This token should be used for authentication when setting up your Zapier integration.


Few things to keep in mind:

  • Don’t share your token or send it by means of unsafe communication. It can be used by anyone to read your communication or send message on your behalf!
  • Generating new token will instantly disable existing token. This will instantly affect your running Zaps: they will stop working and you’ll need to manually update them with the new token to restore them to operation.
  • Zapier integration is not available on all plans. If you don’t see an option of generating a token, please upgrade your workspace to Mass Messaging and Automation plan or contact us for assistance with your subscription.

Events

All chat / message-related events supply the following output fields (that can be used in subsequent steps) in addition to trigger-specific fields:

    • chat_id: id of a chat in TimelinesAI, that can be used to specify chat in “send message” / “send file” actions
    • responsible_email: email address of Timelines user, to whom this chat is assigned in Timelines (empty, if unassigned)
    • responsible_name: full name of Timelines user, to whom this chat is assigned in Timelines (empty, if unassigned)
    • whatsapp_account_phone: phone number of a WhatsApp account for which the event was triggered
    • whatsapp_account_timelines_email: email address of Timelines user, that connected the WhatsApp account in Timelines workspace
    • whatsapp_account_timelines_name: full name of Timelines user, that connected the WhatsApp account in Timelines workspace
    • whatsapp_account_wid: WhatsApp Web API account identifier (for internal use)
  • whatsapp_chat_jid: WhatsApp Web API chat identifier (for internal use)

New Incoming Chat

Triggered when a new chat was started via incoming message.


Output fields:

  • name: name of a chat or a group (if renamed manually via TimelinesAI, chat name in TimelinesAI)

New Outgoing Chat

Triggered when new chat was started via outgoing message.

Note: this will also be triggered when Zapier action “start new chat” is used (if new chat was created as a result of that action).


Output fields:

  • name: name of a chat or a group (if renamed manually via TimelinesAI, chat name in TimelinesAI).

New Received Message

Triggered when new incoming message is received in any WhatsApp account connected to the workspace.


Output:

  • whatsapp_message_id: unique message identifier in Timelines
  • chat_name: name of a chat or a group (if renamed via Timelines, chat name in Timelines) into which the message was received
  • sender_name: name of the sender of the message (usually the same as chat_name, except for group chats)
  • sender_phone: phone number of the sender of the message
  • message_text: plaintext message
  • attachment_url: url of attachment (if present), valid for 15 minutes from the moment of triggering the event.
  • attachment_filename: filename of attachment (if present)

New Sent Message

Triggered when new incoming message is sent (including from WhatsApp Web or WhatsApp Desktop session) from any WhatsApp account connected to the workspace.
Note: this event won’t be triggered if a message was sent by means of one of Zapier “Send message” actions.


Output:

  • whatsapp_message_id: unique message identifier in Timelines
  • chat_name: name of a chat or a group (if renamed via Timelines, chat name in Timelines) into which the message was received
  • sender_name: name of the sender of the message (registered name of the WhatsApp account used to send the message)
  • sender_phone: phone number of the sender of the message
  • recipient_phone: phone number of the recipient (empty if the chat is a group chat)
  • message_text: plaintext message
  • attachment_url: url of attachment (if present), valid for 15 minutes from the moment of triggering the event.
  • attachment_filename: filename of attachment (if present)

Chat Renamed

Triggered when a chat (individual or group) is renamed in WhatsApp mobile app (usually, as a result of change in contact name). Note: this event will not be triggered if the chat was renamed manually via UI in TimelinesAI.


Output:

  • name: new name of the chat.
  • previous_name: previous name of the chat.

Whatsapp Accounts

Triggered when a new WhatsApp account is connected in the current TimelinesAI workspace.


Output:

  • id: unique WhatsApp Web API account identifier (for internal use)
  • name: registered name of the WhatsApp account
  • whatsapp_account_phone: phone number of a WhatsApp account for which the event was triggered
  • whatsapp_account_timelines_email: registration email address of a TimelinesAI user, that connected the WhatsApp account in the current workspace
  • whatsapp_account_timelines_name: full name of a Timelines user, that connected the WhatsApp account in the current workspace

Actions

Send Message to New Chat

Starts a new chat by sending a message to a recipient, specified by a phone number in international format. If the chat with recipient already exists, the message will be sent to that chat. The action will accept the message for sending, after verifying the correctness of the recipient phone number format and the status of connected WhatsApp account. Actual sending attempt will be performed asynchronously (usually within few seconds). Message status can be checked later via UI.

Starting a new chat by sending an attachment is not supported. If you need to send attachment to a new chat, send text message first and then use “chat_id” from previous action’s output in conjunction with “Send File to Existing Chat” action.


input:

  • Whatsapp Account – WhatsApp account to be used for sending message. Can be selected from all WhatsApp accounts in the current workspace, or specified as a phone number in international format. If selected Whatsapp account becomes disconnected or provided phone number doesn’t correspond to a connected WhatsApp account, the action will fail instantly.
  • Phone number – phone number of a recipient WhatsApp account, in international format (with leading “+” and country code).
  • Message text – plain message text (no markup supported). Newlines can be added via Zapier text field formatting. Text size is subject to WhatsApp platform limit (which is currently 65,534 characters). URLs will be automatically displayed as links in recipient’s WhatsApp client.

output:

  • chat_id: id of a chat in TimelinesAI, can be used to specify chat in “send message” / “send file” actions.
  • whatsapp_message_id: id of a message, that will be sent, a unique message identifier in TimelinesAI.
  • whatsapp_chat_jid: WhatsApp Web API chat identifier (for internal use).

instant failure reasons (with appropriate error message):

  • Specified Whatsapp account not found.
  • Destination phone number is in invalid format.
  • Message text can not be empty
  • Monthly mass sending quota exceeded.

Send Message to Existing Chat

Sends a message into existing chat, that can be specified either by chat_id  (recommended) or by combination of Whatsapp Account and Whatsapp chat jid. The action will accept the message for sending. Actual sending attempt will be performed asynchronously. Message status can later be checked via UI.


Input:

  • Chat Id: id of a chat in TimelinesAI, returned as an output of previous trigger or action or lookup.
  • Whatsapp Account Phone – phone number of WhatsApp account to be used for sending message.
  • Whatsapp chat jid: WhatsApp Web API chat identifier, returned as an output of previous trigger or action or lookup.
  • Message text – plain message text (no markup supported). Newlines can be added via Zapier text field formatting. Text size is subject to WhatsApp platform limit (which is currently 65,534 characters). URLs will be automatically displayed as links in recipient’s WhatsApp client.

Output:

  • whatsapp_message_id: id of a message, that will be sent, a unique message identifier in TimelinesAI

instant failure reasons (with appropriate error messages):

  • Monthly mass sending quota exceeded.
  • Specified Whatsapp account not found.
  • Specified jid not found.
  • Specified chat_id not found.

Send File to Existing Chat

Sends file attachment into existing chat, that can be specified either by chat_id  (recommended) or by combination of Whatsapp Account and Whatsapp chat jid. Files can be sent by means of specifying a combination of downloadable publicly accessible URL and filename (can be different from the name in the URL).
Note: supported file size is limited to 2 MegaBytes (this restriction is shared with other Mass Sending and Automation options in TimelinesAI and doesn’t apply to sending messages manually via UI of TimelinesAI, where files up to 100 MegaBytes can be sent).
At the time of sending, the file will be downloaded and cached for subsequent sending attempts.

The action will accept the message for sending, however the availability or size of the file will not be checked at this time. Actual sending attempt will be performed asynchronously and may fail due to inability to invalid file URL or size. Message status can later be checked via UI.


Input:

  • Chat Id: id of a chat in TimelinesAI, returned as an output of previous trigger or action or lookup.
  • Whatsapp Account Phone – phone number of WhatsApp account to be used for sending message.
  • Attachment URL: WhatsApp Web API chat identifier, returned as an output of previous trigger or action or lookup.
  • Attachment URL – downloadable, publicly accessible URL.
  • Name of attached file – the name of the file, as received by the recipient.

Output:

  • whatsapp_message_id: id of a message, that will be sent, a unique message identifier in TimelinesAI

Instant failure reasons (with appropriate error message):

  • Monthly mass sending quota exceeded.
  • Specified Whatsapp account not found.
  • Specified jid not found.
  • Specified chat_id not found.
  • Attachment URL is invalid.

Searches

Find Chat

Searches for a chat (including group chats) and fetches its details. Same output is returned, as for “New Incoming Chat” trigger. Only one search field should be specified:

  • Chat Id: id of a chat in TimelinesAI, returned as an output of previous trigger or action or lookup.
  • Name: name of a chat as appears in TimelinesAI (corresponds to the name of the chat as appears in WhatsApp Mobile App, unless renamed in TimelinesAI).
  • Phone: phone number in international format (with leading “+” and country code), that specifies the second party in the chat (not supported for group chats)

Find Whatsapp Account

Searches for a Whatsapp Account in the current TimelinesAI workspace and fetches its details. Same output is returned, as for “Whatsapp Accounts” trigger. Only one search field should be specified:

  • Phone: phone number in international format (with leading “+” and country code), that corresponds to a WhatsApp account connected in the current workspace.
  • Email: registration email address of TimelinesAI user, belonging to the current workspace, whose WhatsApp account is to be searched for.
 
 
Latest posts by Aizhan Khalikova (see all)