0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Dify ワークフローを定期実行させる

Last updated at Posted at 2025-10-11

はじめに

おそらくいろんなやり方が考えられるが、簡単かつ無料で行える方法としてGithub Actionsを使った方法を紹介する

手順

以下のようなワークフローをgithub actionsで作成する

.github/workflows/trigger-dify-workflow.yml
name: Trigger Dify Workflow

on:
  schedule:
    - cron: "0 0 * * *" # 毎日9時(日本時間)に実行
  workflow_dispatch:    # 手動実行も可能にしている

jobs:
  call-dify:
    runs-on: ubuntu-latest
    steps:
      - name: Call Dify API
        run: |
          curl -X POST "https://api.dify.ai/v1/workflows/run" \
            -H "Content-Type: application/json" \
            -H "Authorization: Bearer ${{ secrets.DIFY_API_SECRET_KEY }}" \
            -d '{
              "user": "github-actions",
              "response_mode": "blocking",
              "inputs": {}
            }'

以上。

実行頻度を変えたい場合

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?