@actionsflow/trigger-typeform 中文文档教程
@actionsflow/trigger-typeform
这是 Actionsflow 的 typeform 触发器. Typeform 中的任何新提交都会触发触发器。
这是一个官方触发器,您不需要手动安装它。
Prerequisites
你应该 在typeform form connect->webhooks处创建一个webhook->webhooks,并设置https://webhook.actionsflow.workers.dev /
as your endpoint
Usage
on:
typeform:
Options
没有什么可以指定的。 您可以使用Actionsflow 触发器的常规配置 进行更多自定义。
Outputs
此触发器的输出将是 aws sns 消息正文的正文,您可以看到它 此处
一个输出示例:
{
"event_id": "01EK4R5PFZZP6C8H14RTP4YW6C",
"event_type": "form_response",
"form_response": {
"form_id": "g8hcyeXS",
"token": "x71for1wr6irs2rx71fotn12b3izh25v",
"landed_at": "2020-09-26T08:23:47Z",
"submitted_at": "2020-09-26T08:23:49Z",
"definition": {
"id": "g8hcyeXS",
"title": "Feedback",
"fields": [
{
"id": "M8JLOd0nIQPU",
"title": "What's your name?",
"type": "short_text",
"ref": "9a489f17-8765-494b-933e-3624c645bd0c",
"properties": {}
}
]
},
"answers": [
{
"type": "text",
"text": "test1",
"field": {
"id": "M8JLOd0nIQPU",
"type": "short_text",
"ref": "9a489f17-8765-494b-933e-3624c645bd0c"
}
}
]
},
"answers_map": {
"What's your name?": "test1"
}
}
您可以像这样使用输出:
on:
typeform:
jobs:
print:
name: Print
runs-on: ubuntu-latest
steps:
- name: Print Outputs
env:
answer: ${{ on.typeform.outputs.answers_map["What's your name?"] }}
run: |
echo answer: $answer
@actionsflow/trigger-typeform
This is a typeform trigger of Actionsflow. Any new submission in Typeform will trigger the trigger.
This is an official trigger, you don't need to install it manually.
Prerequisites
You should Create a webhook at typeform form connect->webhooks, and set https://webhook.actionsflow.workers.dev/<owner>/<repo>/<workflow-file-name>/typeform?__token=<your-github-personal-token>
as your endpoint
Usage
on:
typeform:
Options
There is nothing can be specified. You can use General Config for Actionsflow Trigger for more customization.
Outputs
This trigger's outputs will be the body of the aws sns message body, you can see it here
An outputs example:
{
"event_id": "01EK4R5PFZZP6C8H14RTP4YW6C",
"event_type": "form_response",
"form_response": {
"form_id": "g8hcyeXS",
"token": "x71for1wr6irs2rx71fotn12b3izh25v",
"landed_at": "2020-09-26T08:23:47Z",
"submitted_at": "2020-09-26T08:23:49Z",
"definition": {
"id": "g8hcyeXS",
"title": "Feedback",
"fields": [
{
"id": "M8JLOd0nIQPU",
"title": "What's your name?",
"type": "short_text",
"ref": "9a489f17-8765-494b-933e-3624c645bd0c",
"properties": {}
}
]
},
"answers": [
{
"type": "text",
"text": "test1",
"field": {
"id": "M8JLOd0nIQPU",
"type": "short_text",
"ref": "9a489f17-8765-494b-933e-3624c645bd0c"
}
}
]
},
"answers_map": {
"What's your name?": "test1"
}
}
You can use the outputs like this:
on:
typeform:
jobs:
print:
name: Print
runs-on: ubuntu-latest
steps:
- name: Print Outputs
env:
answer: ${{ on.typeform.outputs.answers_map["What's your name?"] }}
run: |
echo answer: $answer